diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-05-28 17:56:26 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-05-28 17:56:42 +0200 |
commit | f09c62954e2f585026ca0f09d199eee3644a5c1a (patch) | |
tree | 92e2414f066bc99ff8de11aae6e818bd316553de | |
parent | 9fd20ed0d2e2ec895f4b6987ab610968bd9a93e3 (diff) |
allow to choose ld garbage collector
-rw-r--r-- | mk/vars.mk | 6 | ||||
-rw-r--r-- | target/config/Config.in.toolchain | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/mk/vars.mk b/mk/vars.mk index ef87acb79..7179eb145 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -124,6 +124,12 @@ TARGET_CFLAGS+= -fPIE TARGET_CXXFLAGS+= -fPIE endif +ifneq ($(ADK_TARGET_USE_LD_GC),) +TARGET_CFLAGS+= -fdata-sections -ffunction-sections +TARGET_CXXFLAGS+= -fdata-sections -ffunction-sections +TARGET_LDFLAGS+= -Wl,--gc-sections +endif + ifneq ($(ADK_TARGET_USE_LTO),) TARGET_CFLAGS+= -flto TARGET_CXXFLAGS+= -flto diff --git a/target/config/Config.in.toolchain b/target/config/Config.in.toolchain index 760317429..e25152a49 100644 --- a/target/config/Config.in.toolchain +++ b/target/config/Config.in.toolchain @@ -67,6 +67,11 @@ config ADK_TARGET_USE_LTO select ADK_TOOLCHAIN_WITH_LTO default n +config ADK_TARGET_USE_LD_GC + prompt "Use LD garbage collection for all packages" + boolean + default n + config ADK_TOOLCHAIN_WITH_GOLD boolean default n |