summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-06-04 15:11:31 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-06-04 15:11:38 +0200
commitb9af8ec237dc55f49d8a929226598050498e999d (patch)
tree9b6437cd954d597910585c7a396ca8c5312468d7 /mk
parent45c200b2a66c3c63e7ed6f31f22958810263e2fd (diff)
make ld relro and bind now optional
Diffstat (limited to 'mk')
-rw-r--r--mk/build.mk2
-rw-r--r--mk/vars.mk8
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)