From: Andre McCurdy <armccurdy@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 4/4] native.bbclass: poison TARGET_CFLAGS etc for native builds
Date: Fri, 26 Feb 2016 21:53:07 -0800 [thread overview]
Message-ID: <1456552387-10564-5-git-send-email-armccurdy@gmail.com> (raw)
In-Reply-To: <1456552387-10564-1-git-send-email-armccurdy@gmail.com>
TARGET_* FLAGS are never passed to the native toolchain. However,
they are exported so their values affect the checksum of every task.
Replace with fixed values to both avoid any unnecessary rebuilding
of native packages when target flags are changed (as before) and now
also to poison any accidental use of target flags with the native
toolchain.
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
meta/classes/native.bbclass | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index f67ef00..34c08b2 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -26,10 +26,18 @@ TARGET_PREFIX = "${BUILD_PREFIX}"
TARGET_CC_ARCH = "${BUILD_CC_ARCH}"
TARGET_LD_ARCH = "${BUILD_LD_ARCH}"
TARGET_AS_ARCH = "${BUILD_AS_ARCH}"
-TARGET_CPPFLAGS = "${BUILD_CPPFLAGS}"
-TARGET_CFLAGS = "${BUILD_CFLAGS}"
-TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
-TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
+
+# TARGET_* FLAGS are never passed to the native toolchain. However, they are
+# exported so their values affect the checksum of every task. Replace with fixed
+# values to both avoid any unnecessary rebuilding of native packages when target
+# flags are changed and to poison any accidental use of target flags with the
+# native toolchain.
+TARGET_CPPFLAGS = "--target-cppflag-never-passed-to-the-native-toolchain"
+TARGET_CFLAGS = "--target-cflag-never-passed-to-the-native-toolchain"
+TARGET_CXXFLAGS = "--target-cxxflag-never-passed-to-the-native-toolchain"
+TARGET_LDFLAGS = "--target-ldflag-never-passed-to-the-native-toolchain"
+
+# Hardcoding is OK since native always implies x86 or x86-64.
TARGET_FPU = ""
HOST_ARCH = "${BUILD_ARCH}"
--
1.9.1
next prev parent reply other threads:[~2016-02-27 5:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-27 5:53 [PATCH 0/4] poison TARGET_CFLAGS etc for native builds Andre McCurdy
2016-02-27 5:53 ` [PATCH 1/4] grub2.inc: dont export TARGET_CFLAGS etc to grub2 configure Andre McCurdy
2016-02-27 5:53 ` [PATCH 2/4] grub2.inc: avoid passing -isystem to native builds Andre McCurdy
2016-02-27 5:53 ` [PATCH 3/4] grub2.inc: drop bogus dependency on xz Andre McCurdy
2016-02-27 5:53 ` Andre McCurdy [this message]
2016-02-27 8:20 ` [PATCH 4/4] native.bbclass: poison TARGET_CFLAGS etc for native builds Richard Purdie
2016-02-27 20:49 ` 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=1456552387-10564-5-git-send-email-armccurdy@gmail.com \
--to=armccurdy@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.