From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe002.messaging.microsoft.com [216.32.181.182]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 60E9EE0149D for ; Sat, 9 Mar 2013 07:32:13 -0800 (PST) Received: from mail164-ch1-R.bigfish.com (10.43.68.228) by CH1EHSOBE004.bigfish.com (10.43.70.54) with Microsoft SMTP Server id 14.1.225.23; Sat, 9 Mar 2013 15:32:12 +0000 Received: from mail164-ch1 (localhost [127.0.0.1]) by mail164-ch1-R.bigfish.com (Postfix) with ESMTP id 460B1201BF for ; Sat, 9 Mar 2013 15:32:12 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz17326ah8275dh8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1155h) Received: from mail164-ch1 (localhost.localdomain [127.0.0.1]) by mail164-ch1 (MessageSwitch) id 1362843131452561_13057; Sat, 9 Mar 2013 15:32:11 +0000 (UTC) Received: from CH1EHSMHS009.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.254]) by mail164-ch1.bigfish.com (Postfix) with ESMTP id 6C23A4E008A for ; Sat, 9 Mar 2013 15:32:11 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS009.bigfish.com (10.43.70.9) with Microsoft SMTP Server (TLS) id 14.1.225.23; Sat, 9 Mar 2013 15:32:11 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server (TLS) id 14.2.328.11; Sat, 9 Mar 2013 15:32:10 +0000 Received: from b28495.ap.freescale.net (udp143739uds.ap.freescale.net [10.192.208.202]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r29FW3rq027885; Sat, 9 Mar 2013 08:32:08 -0700 From: To: Date: Sat, 9 Mar 2013 23:31:57 +0800 Message-ID: <1362843123-18078-3-git-send-email-b28495@freescale.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1362843123-18078-1-git-send-email-b28495@freescale.com> References: <1362843123-18078-1-git-send-email-b28495@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Subject: [meta-fsl-ppc][PATCH v5 2/8] qemu: configure properly check if -lrt is needed X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2013 15:32:13 -0000 Content-Type: text/plain From: Ting Liu -lrt is needed to avoid the error "undefined reference to `timer_settime'". add the check in configure. Backport from http://git.qemu.org/?p=qemu.git commit: 8bacde8d86a09699207d85d4bab06162aed18dc4 Fix the below build issue: | ../qemu-timer.o: In function `dynticks_rearm_timer': | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined reference to `timer_gettime' | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined reference to `timer_settime' | ../qemu-timer.o: In function `dynticks_stop_timer': | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined reference to `timer_delete' | ../qemu-timer.o: In function `dynticks_start_timer': | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined reference to `timer_create' | ivshmem.o: In function `pci_ivshmem_init': | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined reference to `shm_open' | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined reference to `shm_open' | collect2: error: ld returned 1 exit status | make[1]: *** [qemu-system-ppc] Error 1 | make: *** [subdir-ppc-softmmu] Error 2 | ERROR: oe_runmake failed | ERROR: Function failed: do_compile Yocto 1.4_M4 uses qemu 1.3.1 which includes this fix. So this issue only appeared to us. Signed-off-by: Ting Liu --- ...configure-properly-check-if-lrt-is-needed.patch | 43 ++++++++++++++++++++ recipes-devtools/qemu/qemu_1.0.bb | 6 ++- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch diff --git a/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch b/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch new file mode 100644 index 0000000..d74ddb9 --- /dev/null +++ b/recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch @@ -0,0 +1,43 @@ +From e5906138d8042817cc3b49872dd181c66a11abdf Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Wed, 6 Mar 2013 01:56:35 -0600 +Subject: [PATCH] configure: properly check if -lrt is needed + +Upstream-Status: Backport +commit 8bacde8d86a09699207d85d4bab06162aed18dc4 + +Signed-off-by: Natanael Copa +Signed-off-by: Blue Swirl +Signed-off-by: Ting Liu +--- + configure | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 999375a..29b3e30 100755 +--- a/configure ++++ b/configure +@@ -2444,13 +2444,18 @@ fi + cat > $TMPC < + #include +-int main(void) { clockid_t id; return clock_gettime(id, NULL); } ++int main(void) { ++ timer_create(CLOCK_REALTIME, NULL, NULL); ++ return clock_gettime(CLOCK_REALTIME, NULL); ++} + EOF + + if compile_prog "" "" ; then + : +-elif compile_prog "" "-lrt" ; then ++# we need pthread for static linking. use previous pthread test result ++elif compile_prog "" "-lrt $pthread_lib" ; then + LIBS="-lrt $LIBS" ++ libs_qga="-lrt $libs_qga" + fi + + if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \ +-- +1.7.9.7 + diff --git a/recipes-devtools/qemu/qemu_1.0.bb b/recipes-devtools/qemu/qemu_1.0.bb index ff4afde..19efd9f 100644 --- a/recipes-devtools/qemu/qemu_1.0.bb +++ b/recipes-devtools/qemu/qemu_1.0.bb @@ -5,11 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ # This means v1.0 with FSL specific patches applied PV = "1.0+fsl" -PR = "r2" +PR = "r3" DEPENDS += "dtc" -SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" +SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git \ + file://0001-configure-properly-check-if-lrt-is-needed.patch \ +" SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f" S = "${WORKDIR}/git" -- 1.7.3.4