summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorTing Liu <b28495@freescale.com>2013-03-08 15:28:29 +0000
committerMatthew McClintock <msm-oss@mcclintock.net>2013-03-08 17:58:14 -0600
commite699fcc24d25e4a09ff314922a857577a6909736 (patch)
tree844339b70b7aa774f7dcd81560d6d09a943990c3 /recipes-devtools
parent443ec6e840d2e8036c16598124062196ee9fd7ed (diff)
downloadmeta-fsl-ppc-e699fcc24d25e4a09ff314922a857577a6909736.tar.gz
qemu: configure properly check if -lrt is needed
-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 <b28495@freescale.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/qemu/files/0001-configure-properly-check-if-lrt-is-needed.patch43
-rw-r--r--recipes-devtools/qemu/qemu_1.0.bb6
2 files changed, 47 insertions, 2 deletions
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 @@
1From e5906138d8042817cc3b49872dd181c66a11abdf Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com>
3Date: Wed, 6 Mar 2013 01:56:35 -0600
4Subject: [PATCH] configure: properly check if -lrt is needed
5
6Upstream-Status: Backport
7commit 8bacde8d86a09699207d85d4bab06162aed18dc4
8
9Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
10Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11Signed-off-by: Ting Liu <b28495@freescale.com>
12---
13 configure | 9 +++++++--
14 1 file changed, 7 insertions(+), 2 deletions(-)
15
16diff --git a/configure b/configure
17index 999375a..29b3e30 100755
18--- a/configure
19+++ b/configure
20@@ -2444,13 +2444,18 @@ fi
21 cat > $TMPC <<EOF
22 #include <signal.h>
23 #include <time.h>
24-int main(void) { clockid_t id; return clock_gettime(id, NULL); }
25+int main(void) {
26+ timer_create(CLOCK_REALTIME, NULL, NULL);
27+ return clock_gettime(CLOCK_REALTIME, NULL);
28+}
29 EOF
30
31 if compile_prog "" "" ; then
32 :
33-elif compile_prog "" "-lrt" ; then
34+# we need pthread for static linking. use previous pthread test result
35+elif compile_prog "" "-lrt $pthread_lib" ; then
36 LIBS="-lrt $LIBS"
37+ libs_qga="-lrt $libs_qga"
38 fi
39
40 if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
41--
421.7.9.7
43
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 \
5 5
6# This means v1.0 with FSL specific patches applied 6# This means v1.0 with FSL specific patches applied
7PV = "1.0+fsl" 7PV = "1.0+fsl"
8PR = "r2" 8PR = "r3"
9 9
10DEPENDS += "dtc" 10DEPENDS += "dtc"
11 11
12SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git" 12SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git \
13 file://0001-configure-properly-check-if-lrt-is-needed.patch \
14"
13SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f" 15SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f"
14 16
15S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"