From 3d831a7c27e8c781bf7cfef0e36a6f27f38c0cf4 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 22 Dec 2004 21:04:52 +0000 Subject: Cleaned up patch from Peter S. Mazinger adding support for -fstack-protector and -fno-stack-protector-all security options --- Rules.mak | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Rules.mak') 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 -- cgit v1.2.3