From b9af8ec237dc55f49d8a929226598050498e999d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 4 Jun 2014 15:11:31 +0200 Subject: make ld relro and bind now optional --- mk/build.mk | 2 ++ mk/vars.mk | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'mk') 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) -- cgit v1.2.3