diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-12-22 21:34:27 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-12-22 21:34:27 +0000 |
commit | f8e6aa06ffb1897b87f4d90545e8ca5b3d0cdb9a (patch) | |
tree | 2611d23c8bdd8c0191e6b32cb0e074826293cc23 /Rules.mak | |
parent | 6ae64d25832babd791a3991c34f23c90fd4966ae (diff) |
Patch from Peter S. Mazinger:
Add UCLIBC_BUILD_NOEXECSTACK support.
Diffstat (limited to 'Rules.mak')
-rw-r--r-- | Rules.mak | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -89,10 +89,10 @@ ARFLAGS:=r OPTIMIZATION:= PICFLAG:=-fPIC + PIEFLAG:=$(call check_gcc,-fPIE,) ifeq ($(strip $(PIEFLAG)),-fPIE) -# should add check if ld supports -pie -LDPIEFLAG:=-Wl,-pie +LDPIEFLAG:=$(shell $(LD) --help | grep -q pie && echo "-Wl,-pie") endif # Some nice CPU specific optimizations @@ -286,6 +286,10 @@ ifeq ($(DOPIC),y) endif ASFLAGS = $(CFLAGS) +ifeq ($(UCLIBC_BUILD_NOEXECSTACK),y) +check_as_noexecstack=$(shell if $(LD) --help | grep -q "z noexecstack"; then echo "-Wa,--noexecstack"; fi) +ASFLAGS += $(check_as_noexecstack) +endif LIBGCC_CFLAGS ?= $(CFLAGS) $(CPU_CFLAGS-y) LIBGCC:=$(shell $(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name) |