[gnome-continuous-yocto/gnomeostree-3.28-rocko: 924/8267] qemu-native: set ld.bfd, fix cflags, and set some environment vars
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 924/8267] qemu-native: set ld.bfd, fix cflags, and set some environment vars
- Date: Sat, 16 Dec 2017 21:06:28 +0000 (UTC)
commit 44ab979c4d7d5bc09df6fe920d5a171d281fa600
Author: Stephen Arnold <sarnold vctlabs com>
Date: Sun Jun 12 18:09:56 2016 -0700
qemu-native: set ld.bfd, fix cflags, and set some environment vars
The main thing is build failures with gold linker, but qemu is also a
little too aggressive at finding random tools on the build host, so we
also set the build env for qemu-native and make sure it doesn't reset
its own (hard-coded) cflags when we don't want it to.
(From OE-Core rev: 862c9cbbef1f17b57c0ea369d88194b60623ffdd)
Signed-off-by: Stephen Arnold <sarnold vctlabs com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/recipes-devtools/qemu/qemu.inc | 13 +++++++++++--
.../qemu/qemu/qemu-2.5.0-cflags.patch | 13 +++++++++++++
meta/recipes-devtools/qemu/qemu_2.6.0.bb | 4 +++-
3 files changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index bf689bb..d5925fd 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -30,8 +30,12 @@ SRC_URI_append_class-native = "\
EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-bluez
--disable-libiscsi --with-system-pixman --extra-cflags='${CFLAGS}'"
-EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror \
- "
+EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror"
+
+EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
+
+LDFLAGS_append_class-native = " -fuse-ld=bfd"
+
export LIBTOOL="${HOST_SYS}-libtool"
do_configure_prepend_class-native() {
@@ -40,6 +44,11 @@ do_configure_prepend_class-native() {
if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
fi
+
+ # Alter target makefiles to accept CFLAGS set via env
+ sed -i -r \
+ -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
+ "${S}"/Makefile "${S}"/Makefile.target
}
KVMENABLE = "--enable-kvm"
diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
new file mode 100644
index 0000000..173394f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
@@ -0,0 +1,13 @@
+--- a/configure
++++ b/configure
+@@ -4468,10 +4468,6 @@ fi
+ if test "$gcov" = "yes" ; then
+ CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
+ LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
+-elif test "$fortify_source" = "yes" ; then
+- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
+-elif test "$debug" = "no"; then
+- CFLAGS="-O2 $CFLAGS"
+ fi
+
+ ##########################################
diff --git a/meta/recipes-devtools/qemu/qemu_2.6.0.bb b/meta/recipes-devtools/qemu/qemu_2.6.0.bb
index e391326..735d013 100644
--- a/meta/recipes-devtools/qemu/qemu_2.6.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.6.0.bb
@@ -8,7 +8,9 @@ SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
file://no-valgrind.patch \
file://pathlimit.patch \
- "
+ file://qemu-2.5.0-cflags.patch \
+"
+
SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
SRC_URI[md5sum] = "ca3f70b43f093e33e9e014f144067f13"
SRC_URI[sha256sum] = "c9ac4a651b273233d21b8bec32e30507cb9cce7900841febc330956a1a8434ec"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]