1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +00:00

bitbake.conf: include ASNEEDED in TARGET_LDFLAGS directly

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).

(From OE-Core rev: 996bcb143cb8755cadb986e084b5f24e3ffdb03b)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Andre McCurdy
2018-05-29 14:29:47 -07:00
committed by Richard Purdie
parent 77a0b5e9a4
commit 0a2f61a0d4
3 changed files with 3 additions and 8 deletions
+3 -1
View File
@@ -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} "
-4
View File
@@ -1,4 +0,0 @@
ASNEEDED = "-Wl,--as-needed"
TARGET_LDFLAGS += "${ASNEEDED}"
@@ -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}"