diff options
author | Andre McCurdy <armccurdy@gmail.com> | 2018-05-29 14:29:47 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-04 15:15:00 +0100 |
commit | 0a2f61a0d44a7dd635d5119de186f5efbc81a169 (patch) | |
tree | 494e3eeb48f294fd839e537331b59f871111dcfa /meta/conf/bitbake.conf | |
parent | 77a0b5e9a4c2f5a4a1e5e68fa7e871b775341b70 (diff) | |
download | poky-0a2f61a0d44a7dd635d5119de186f5efbc81a169.tar.gz |
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>
Diffstat (limited to 'meta/conf/bitbake.conf')
-rw-r--r-- | meta/conf/bitbake.conf | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 15f6da71cc..fab3dcccba 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -585,8 +585,10 @@ LINKER_HASH_STYLE_mipsarch = "sysv" | |||
585 | 585 | ||
586 | TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE') != 'gnu']}" | 586 | TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE') != 'gnu']}" |
587 | 587 | ||
588 | ASNEEDED ?= "-Wl,--as-needed" | ||
589 | |||
588 | export LDFLAGS = "${TARGET_LDFLAGS}" | 590 | export LDFLAGS = "${TARGET_LDFLAGS}" |
589 | export TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE}" | 591 | export TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}" |
590 | 592 | ||
591 | # Pass parallel make options to the compile task | 593 | # Pass parallel make options to the compile task |
592 | EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} " | 594 | EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} " |