summaryrefslogtreecommitdiffstats
path: root/Rules.mak
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-12-22 21:04:52 +0000
committerEric Andersen <andersen@codepoet.org>2004-12-22 21:04:52 +0000
commit3d831a7c27e8c781bf7cfef0e36a6f27f38c0cf4 (patch)
tree19e83f3381403ba4e6c7e039e381f5d2c23f0e3e /Rules.mak
parent98701e85730391501e100419ab3aeb7dd77055d2 (diff)
downloaduClibc-alpine-3d831a7c27e8c781bf7cfef0e36a6f27f38c0cf4.tar.bz2
uClibc-alpine-3d831a7c27e8c781bf7cfef0e36a6f27f38c0cf4.tar.xz
Cleaned up patch from Peter S. Mazinger adding support for
-fstack-protector and -fno-stack-protector-all security options
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak9
1 files changed, 7 insertions, 2 deletions
diff --git a/Rules.mak b/Rules.mak
index 7c6b51d6b..75bf9462a 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -231,9 +231,13 @@ PIEFLAG=
LDPIEFLAG=
endif
-ifeq ($(SSP_CFLAGS),)
+SSP_DISABLE_FLAGS=$(call check_gcc,-fno-stack-protector,)
+ifeq ($(UCLIBC_PROPOLICE),y)
SSP_CFLAGS=$(call check_gcc,-fno-stack-protector-all,)
SSP_CFLAGS+=$(call check_gcc,-fstack-protector,)
+SSP_ALL_CFLAGS=$(call check_gcc,-fstack-protector-all,)
+else
+SSP_CFLAGS=$(SSP_DISABLE_FLAGS)
endif
# Some nice CFLAGS to work with
@@ -242,7 +246,8 @@ CFLAGS=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) $(SSP_CFLAGS)
ifeq ($(DODEBUG),y)
#CFLAGS += -g3
- CFLAGS = $(XWARNINGS) -O0 -g3 $(CPU_CFLAGS) -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)include -I.
+ CFLAGS = $(XWARNINGS) -O0 -g3 $(CPU_CFLAGS) $(SSP_CFLAGS) \
+ -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)include -I.
LDFLAGS:= $(CPU_LDFLAGS-y) -shared --warn-common --warn-once -z combreloc
STRIPTOOL:= true -Since_we_are_debugging
else