diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-06-04 15:11:31 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-06-04 15:11:38 +0200 |
commit | b9af8ec237dc55f49d8a929226598050498e999d (patch) | |
tree | 9b6437cd954d597910585c7a396ca8c5312468d7 /mk | |
parent | 45c200b2a66c3c63e7ed6f31f22958810263e2fd (diff) |
make ld relro and bind now optional
Diffstat (limited to 'mk')
-rw-r--r-- | mk/build.mk | 2 | ||||
-rw-r--r-- | mk/vars.mk | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/mk/build.mk b/mk/build.mk index 5938a467a..1e270e662 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -48,6 +48,8 @@ DEFCONFIG= ADK_DEBUG=n \ ADK_TARGET_USE_GNU_HASHSTYLE=n \ ADK_TARGET_USE_PIE=n \ ADK_TARGET_USE_STATIC_LIBS=n \ + ADK_TARGET_USE_LD_RELRO=n \ + ADK_TARGET_USE_LD_BIND_NOW=n \ ADK_TARGET_USE_LD_GC=n \ ADK_LINUX_ARM_WITH_THUMB=n \ BUSYBOX_IFPLUGD=n \ diff --git a/mk/vars.mk b/mk/vars.mk index df46c5f8f..280c5f6e4 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -89,7 +89,13 @@ TARGET_CXXFLAGS+= -static-libgcc TARGET_LDFLAGS+= -static-libgcc # security optimization, see http://www.akkadia.org/drepper/dsohowto.pdf -TARGET_LDFLAGS+= -Wl,-z,relro,-z,now +ifneq ($(ADK_TARGET_USE_LD_RELRO),) +TARGET_LDFLAGS+= -Wl,-z,relro +endif +ifneq ($(ADK_TARGET_USE_LD_BIND_NOW),) +TARGET_LDFLAGS+= -Wl,-z,now +endif + # needed for musl ppc ifeq ($(ADK_LINUX_PPC),y) ifeq ($(ADK_TARGET_LIB_MUSL),y) |