aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Rules.mak17
1 files changed, 10 insertions, 7 deletions
diff --git a/Rules.mak b/Rules.mak
index b7a91b63b..866e555eb 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -166,16 +166,17 @@ LD_END_GROUP:= -Wl,--end-group
166endif 166endif
167 167
168CHECKED_LDFLAGS := $(call check_ld,$(LD),--warn-common,) 168CHECKED_LDFLAGS := $(call check_ld,$(LD),--warn-common,)
169#CHECKED_LDFLAGS := $(call check_ld,$(LD),-static-libgcc,)
169 170
170# Pin CHECKED_CFLAGS with := so it's only evaluated once. 171# Pin CHECKED_CFLAGS with := so it's only evaluated once.
171CHECKED_CFLAGS:=$(call check_cc,$(CC),-Wall,) 172CHECKED_CFLAGS:=$(call check_cc,$(CC),-Wall,)
172CHECKED_CFLAGS+=$(call check_cc,$(HOSTCC),-Werror,)
173CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wstrict-prototypes,) 173CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wstrict-prototypes,)
174CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wshadow,) 174CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wshadow,)
175CHECKED_CFLAGS+=$(call check_cc,$(CC),-funsigned-char,) 175CHECKED_CFLAGS+=$(call check_cc,$(CC),-funsigned-char,)
176CHECKED_CFLAGS+=$(call check_cc,$(CC),-mmax-stack-frame=256,) 176CHECKED_CFLAGS+=$(call check_cc,$(CC),-mmax-stack-frame=256,)
177CHECKED_CFLAGS+=$(call check_cc,$(CC),-fno-builtin-strlen) 177CHECKED_CFLAGS+=$(call check_cc,$(CC),-fno-builtin-strlen,)
178CHECKED_CFLAGS+=$(call check_cc,$(CC),-finline-limit=0) 178CHECKED_CFLAGS+=$(call check_cc,$(CC),-finline-limit=0,)
179CHECKED_CFLAGS+=$(call check_cc,$(CC),-static-libgcc,)
179 180
180# Preemptively pin this too. 181# Preemptively pin this too.
181PROG_CFLAGS:= 182PROG_CFLAGS:=
@@ -216,11 +217,13 @@ endif
216ifeq ($(strip $(TARGET_ARCH)),i386) 217ifeq ($(strip $(TARGET_ARCH)),i386)
217 OPTIMIZATION+=$(call check_cc,$(CC),-march=i386,) 218 OPTIMIZATION+=$(call check_cc,$(CC),-march=i386,)
218# gcc-4.0 and older seem to benefit from these 219# gcc-4.0 and older seem to benefit from these
219#ifneq ($(strip $(shell [ $(CC_MAJOR) -ge 4 -a $(CC_MINOR) -ge 1 ] ; echo $$?)),0) 220ifneq ($(strip $(shell [ $(CC_MAJOR) -ge 4 -a $(CC_MINOR) -ge 1 ] ; echo $$?)),0)
220 OPTIMIZATION+=$(call check_cc,$(CC),-mpreferred-stack-boundary=2,) 221 OPTIMIZATION+=$(call check_cc,$(CC),-mpreferred-stack-boundary=2,)
221 OPTIMIZATION+=$(call check_cc,$(CC),-falign-functions=1 -falign-jumps=1 -falign-loops=1,\ 222 OPTIMIZATION+=$(call check_cc,$(CC),-falign-functions=1 -falign-jumps=1 -falign-loops=1, -malign-functions=0 -malign-jumps=0 -malign-loops=0,)
222 -malign-functions=0 -malign-jumps=0 -malign-loops=0) 223
223#endif # gcc-4.0 and older 224 # gcc 4.1 produces many broken, totally invalid warnings
225 CHECKED_CFLAGS+=$(call check_cc,$(CC),-Werror,)
226endif # gcc-4.0 and older
224 227
225# gcc-4.1 and beyond seem to benefit from these 228# gcc-4.1 and beyond seem to benefit from these
226ifeq ($(strip $(shell [ $(CC_MAJOR) -ge 4 -a $(CC_MINOR) -ge 1 ] ; echo $$?)),0) 229ifeq ($(strip $(shell [ $(CC_MAJOR) -ge 4 -a $(CC_MINOR) -ge 1 ] ; echo $$?)),0)