summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2012-12-16 13:46:42 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-12-16 13:46:42 +0100
commitf47b542968bd33a66400bff45647a8eff1484f8c (patch)
tree11ee14abac93bc044c45147abc7531eaa669358c
parent471b488349f28449288425e711d04e58beadff22 (diff)
downloadptxdist-f47b542968bd33a66400bff45647a8eff1484f8c.tar.gz
ptxdist-f47b542968bd33a66400bff45647a8eff1484f8c.tar.xz
wrapper: add options for --as-needed
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--platforms/toolchain_options.in7
-rw-r--r--scripts/wrapper/libwrapper.sh1
2 files changed, 8 insertions, 0 deletions
diff --git a/platforms/toolchain_options.in b/platforms/toolchain_options.in
index 59a8ac81f..1c4cb07fb 100644
--- a/platforms/toolchain_options.in
+++ b/platforms/toolchain_options.in
@@ -31,6 +31,13 @@ choice
add "--hash-style=both" to the linker options
endchoice
+config TARGET_LINKER_AS_NEEDED
+ bool
+ prompt "Link only needed libraries (ld --as-needed)"
+ help
+ tell the linker to link in the produced binary only the libraries
+ containing symbols actually used by the binary itself.
+
config TARGET_EXTRA_CPPFLAGS
string
prompt "Extra CPPFLAGS (cpp)"
diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh
index e45ad35cb..a20a46f32 100644
--- a/scripts/wrapper/libwrapper.sh
+++ b/scripts/wrapper/libwrapper.sh
@@ -101,6 +101,7 @@ add_ld_args() {
add_opt_arg TARGET_LINKER_HASH_GNU "${1}--hash-style=gnu"
add_opt_arg TARGET_LINKER_HASH_SYSV "${1}--hash-style=sysv"
add_opt_arg TARGET_LINKER_HASH_BOTH "${1}--hash-style=both"
+ add_opt_arg TARGET_LINKER_AS_NEEDED "${1}--as-needed"
}
ld_add_ld_args() {