From: Andre McCurdy <armccurdy@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2 4/5] bitbake.conf: include ASNEEDED in TARGET_LDFLAGS directly
Date: Tue, 29 May 2018 14:29:47 -0700 [thread overview]
Message-ID: <1527629388-3808-5-git-send-email-armccurdy@gmail.com> (raw)
In-Reply-To: <1527629388-3808-1-git-send-email-armccurdy@gmail.com>
Previously, ASNEEDED was appended to TARGET_LDFLAGS from
as-needed.inc via tcmode-default.inc and so may not have been enabled
for external toolchain builds or other configurations which over-ride
TCMODE (ie builds which do not include tcmode-default.inc).
Include ASNEEDED in TARGET_LDFLAGS directly from bitbake.conf to
ensure that the optimisation is applied to all builds (and for
consistency with the way that TARGET_LINK_HASH_STYLE is handled).
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
meta/conf/bitbake.conf | 4 +++-
meta/conf/distro/include/as-needed.inc | 4 ----
meta/conf/distro/include/tcmode-default.inc | 3 ---
3 files changed, 3 insertions(+), 8 deletions(-)
delete mode 100644 meta/conf/distro/include/as-needed.inc
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 15f6da7..fab3dcc 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -585,8 +585,10 @@ LINKER_HASH_STYLE_mipsarch = "sysv"
TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE') != 'gnu']}"
+ASNEEDED ?= "-Wl,--as-needed"
+
export LDFLAGS = "${TARGET_LDFLAGS}"
-export TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE}"
+export TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}"
# Pass parallel make options to the compile task
EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
diff --git a/meta/conf/distro/include/as-needed.inc b/meta/conf/distro/include/as-needed.inc
deleted file mode 100644
index b163fef..0000000
--- a/meta/conf/distro/include/as-needed.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-
-ASNEEDED = "-Wl,--as-needed"
-
-TARGET_LDFLAGS += "${ASNEEDED}"
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index 4b58df0..d85fd1e 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -65,12 +65,9 @@ PREFERRED_VERSION_glibc-initial ?= "${GLIBCVERSION}"
PREFERRED_VERSION_nativesdk-glibc-initial ?= "${GLIBCVERSION}"
PREFERRED_VERSION_cross-localedef-native ?= "${GLIBCVERSION}"
-
PREFERRED_VERSION_qemu ?= "${QEMUVERSION}"
PREFERRED_VERSION_qemu-native ?= "${QEMUVERSION}"
PREFERRED_VERSION_nativesdk-qemu ?= "${QEMUVERSION}"
-# Setup suitable toolchain flags
-require conf/distro/include/as-needed.inc
GOVERSION ?= "1.9%"
PREFERRED_VERSION_virtual/${TARGET_PREFIX}go ?= "${GOVERSION}"
--
1.9.1
next prev parent reply other threads:[~2018-05-29 21:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-29 21:29 [PATCH v2 0/5] drop as-needed.inc Andre McCurdy
2018-05-29 21:29 ` [PATCH v2 1/5] distcc: move ASNEEDED over-ride into the distcc recipe Andre McCurdy
2018-05-29 21:29 ` [PATCH v2 2/5] as-needed.inc: drop ASNEEDED over-ride for openobex Andre McCurdy
2018-05-29 21:29 ` [PATCH v2 3/5] bitbake.conf: drop obsolete commented out value for TARGET_LDFLAGS Andre McCurdy
2018-05-29 21:29 ` Andre McCurdy [this message]
2018-05-30 2:13 ` [PATCH v2 4/5] bitbake.conf: include ASNEEDED in TARGET_LDFLAGS directly Khem Raj
2018-05-30 17:46 ` Andre McCurdy
2018-05-30 19:11 ` Khem Raj
2018-05-29 21:29 ` [PATCH v2 5/5] bitbake.conf: fix minor typo in comments Andre McCurdy
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=1527629388-3808-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.