aboutsummaryrefslogtreecommitdiffstats
path: root/meta/conf/bitbake.conf
diff options
context:
space:
mode:
Diffstat (limited to 'meta/conf/bitbake.conf')
-rw-r--r--meta/conf/bitbake.conf4
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"
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} "