aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu.inc
diff options
context:
space:
mode:
authorStephen Arnold <sarnold@vctlabs.com>2016-06-12 18:09:56 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-15 17:35:05 +0100
commit862c9cbbef1f17b57c0ea369d88194b60623ffdd (patch)
tree7bd4409438a5a734dcfc57efa4b1a41c69589387 /meta/recipes-devtools/qemu/qemu.inc
parent324f7cea3e73eb3f64cdfa221398797ddd2b50e9 (diff)
downloadopenembedded-core-contrib-862c9cbbef1f17b57c0ea369d88194b60623ffdd.tar.gz
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. Signed-off-by: Stephen Arnold <sarnold@vctlabs.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu.inc')
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc13
1 files changed, 11 insertions, 2 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index bf689bbf43..d5925fd575 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"