diff options
author | Stephen Arnold <sarnold@vctlabs.com> | 2016-06-12 18:09:56 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-15 18:05:21 +0100 |
commit | 44ab979c4d7d5bc09df6fe920d5a171d281fa600 (patch) | |
tree | b7ecda874d12ebce545d8e4ad97e2a6222306ae2 /meta/recipes-devtools/qemu/qemu.inc | |
parent | 8f9f48a29a8478dce203b7b0e439ef5303b05475 (diff) | |
download | poky-44ab979c4d7d5bc09df6fe920d5a171d281fa600.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.
(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>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu.inc')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 13 |
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 = "\ | |||
30 | 30 | ||
31 | EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-bluez --disable-libiscsi --with-system-pixman --extra-cflags='${CFLAGS}'" | 31 | EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-bluez --disable-libiscsi --with-system-pixman --extra-cflags='${CFLAGS}'" |
32 | 32 | ||
33 | EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror \ | 33 | EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror" |
34 | " | 34 | |
35 | EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" | ||
36 | |||
37 | LDFLAGS_append_class-native = " -fuse-ld=bfd" | ||
38 | |||
35 | export LIBTOOL="${HOST_SYS}-libtool" | 39 | export LIBTOOL="${HOST_SYS}-libtool" |
36 | 40 | ||
37 | do_configure_prepend_class-native() { | 41 | do_configure_prepend_class-native() { |
@@ -40,6 +44,11 @@ do_configure_prepend_class-native() { | |||
40 | if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then | 44 | if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then |
41 | export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH | 45 | export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH |
42 | fi | 46 | fi |
47 | |||
48 | # Alter target makefiles to accept CFLAGS set via env | ||
49 | sed -i -r \ | ||
50 | -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \ | ||
51 | "${S}"/Makefile "${S}"/Makefile.target | ||
43 | } | 52 | } |
44 | 53 | ||
45 | KVMENABLE = "--enable-kvm" | 54 | KVMENABLE = "--enable-kvm" |