From: Robert Yang <liezhi.yang@windriver.com>
To: Stephen Arnold <stephen.arnold42@gmail.com>,
Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v4] qemu-native: set ld.bfd, fix cflags, and set some environment vars
Date: Thu, 23 Jun 2016 15:54:48 +0800 [thread overview]
Message-ID: <576B95C8.7070002@windriver.com> (raw)
In-Reply-To: <CAOLEWZUQRF1LBjviUmbHqLO6kTM=ExC=4soBBTmdhvpuRekbmw@mail.gmail.com>
Hi, I got build errors on Ubuntu 12.04 with this patch:
| DEBUG: Executing shell function do_configure
|
| ERROR: "gcc " cannot build an executable (is your linker broken?)
// Robert
On 06/21/2016 09:18 AM, Stephen Arnold wrote:
> And I finally figured out git send-email no longer has a
> --subject-prefix= option so it looks like --compose and hand-edit the
> Subject line in the patch is the only way to increment the version.
>
> This is [PATCH v4] btw...
>
> Steve
>
> On Mon, Jun 20, 2016 at 5:54 PM, Stephen Arnold <sarnold@vctlabs.com> wrote:
>> 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>
>>
>> The cflags patch was imported from Gentoo Portage and has been
>> manitained over several versions; this version was rebased against
>> upstream qemu git.
>>
>> Upstream-Status: Inappropriate
>> - Patch addresses distribution maintenance and build environment
>> sanity.
>>
>> Signed-off-by: Stephen Arnold <nerdboy@gentoo.org>
>> ---
>> meta/recipes-devtools/qemu/qemu.inc | 11 ++++++--
>> .../qemu/qemu/qemu-2.6.0-cflags.patch | 31 ++++++++++++++++++++++
>> meta/recipes-devtools/qemu/qemu_2.6.0.bb | 1 +
>> 3 files changed, 41 insertions(+), 2 deletions(-)
>> create mode 100644 meta/recipes-devtools/qemu/qemu/qemu-2.6.0-cflags.patch
>>
>> diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
>> index bf689bb..0a68f05 100644
>> --- a/meta/recipes-devtools/qemu/qemu.inc
>> +++ b/meta/recipes-devtools/qemu/qemu.inc
>> @@ -30,8 +30,10 @@ 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="${TARGET_PREFIX}ld.bfd" AR="${AR}" OBJCOPY="${OBJCOPY}" LDFLAGS="${LDFLAGS}""
>> +
>> export LIBTOOL="${HOST_SYS}-libtool"
>>
>> do_configure_prepend_class-native() {
>> @@ -40,6 +42,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.6.0-cflags.patch b/meta/recipes-devtools/qemu/qemu/qemu-2.6.0-cflags.patch
>> new file mode 100644
>> index 0000000..5b78edf
>> --- /dev/null
>> +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.6.0-cflags.patch
>> @@ -0,0 +1,31 @@
>> +From 5d29baaf7a8c09f2f97231116e0f396b0402b23d Mon Sep 17 00:00:00 2001
>> +From: Steve Arnold <stephen.arnold42@gmail.com>
>> +Date: Sun, 19 Jun 2016 11:29:44 -0700
>> +Subject: [PATCH] configure: remove hard-coded flags and let build env handle
>> + it
>> +
>> +Apply distribution patch for handling debug and fortify source options.
>> +
>> +Signed-off-by: Steve Arnold <nerdboy@gentoo.org>
>> +---
>> + configure | 4 ----
>> + 1 file changed, 4 deletions(-)
>> +
>> +diff --git a/configure b/configure
>> +index 10cb212..6f1b10c 100755
>> +--- a/configure
>> ++++ b/configure
>> +@@ -4539,10 +4539,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
>> +
>> + ##########################################
>> +--
>> +2.8.1
>> +
>> diff --git a/meta/recipes-devtools/qemu/qemu_2.6.0.bb b/meta/recipes-devtools/qemu/qemu_2.6.0.bb
>> index e391326..62c509b 100644
>> --- a/meta/recipes-devtools/qemu/qemu_2.6.0.bb
>> +++ b/meta/recipes-devtools/qemu/qemu_2.6.0.bb
>> @@ -8,6 +8,7 @@ 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"
>> --
>> 2.8.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
next prev parent reply other threads:[~2016-06-23 7:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 1:18 [PATCH v4] qemu-native: set ld.bfd, fix cflags, and set some environment vars Stephen Arnold
2016-06-23 7:54 ` Robert Yang [this message]
2016-06-24 2:29 ` Ting Liu
2016-06-24 3:44 ` Stephen Arnold
2016-06-24 8:00 ` Burton, Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=576B95C8.7070002@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=stephen.arnold42@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox