svn commit: trunk/busybox
landley at busybox.net
landley at busybox.net
Mon Jul 31 22:56:17 UTC 2006
Author: landley
Date: 2006-07-31 15:56:17 -0700 (Mon, 31 Jul 2006)
New Revision: 15761
Log:
1) ifeq is make syntax, #ifeq is a make comment.
2) The check_cc macros should probably all have the same number of arguments.
3) Move the -Werror into the gcc 4.0 on i386 test, because gcc 4.1 is broken
and produces warnings for things that provably aren't incorrect.
In other news it would be nice if our check_ld macro actually did something,
and why does or makefile do all the check_cc calls, then call itself as if
it's building out of tree, then do all the check_cc calls again?
Modified:
trunk/busybox/Rules.mak
Changeset:
Modified: trunk/busybox/Rules.mak
===================================================================
--- trunk/busybox/Rules.mak 2006-07-31 22:50:12 UTC (rev 15760)
+++ trunk/busybox/Rules.mak 2006-07-31 22:56:17 UTC (rev 15761)
@@ -166,16 +166,17 @@
endif
CHECKED_LDFLAGS := $(call check_ld,$(LD),--warn-common,)
+#CHECKED_LDFLAGS := $(call check_ld,$(LD),-static-libgcc,)
# Pin CHECKED_CFLAGS with := so it's only evaluated once.
CHECKED_CFLAGS:=$(call check_cc,$(CC),-Wall,)
-CHECKED_CFLAGS+=$(call check_cc,$(HOSTCC),-Werror,)
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wstrict-prototypes,)
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wshadow,)
CHECKED_CFLAGS+=$(call check_cc,$(CC),-funsigned-char,)
CHECKED_CFLAGS+=$(call check_cc,$(CC),-mmax-stack-frame=256,)
-CHECKED_CFLAGS+=$(call check_cc,$(CC),-fno-builtin-strlen)
-CHECKED_CFLAGS+=$(call check_cc,$(CC),-finline-limit=0)
+CHECKED_CFLAGS+=$(call check_cc,$(CC),-fno-builtin-strlen,)
+CHECKED_CFLAGS+=$(call check_cc,$(CC),-finline-limit=0,)
+CHECKED_CFLAGS+=$(call check_cc,$(CC),-static-libgcc,)
# Preemptively pin this too.
PROG_CFLAGS:=
@@ -216,12 +217,14 @@
ifeq ($(strip $(TARGET_ARCH)),i386)
OPTIMIZATION+=$(call check_cc,$(CC),-march=i386,)
# gcc-4.0 and older seem to benefit from these
-#ifneq ($(strip $(shell [ $(CC_MAJOR) -ge 4 -a $(CC_MINOR) -ge 1 ] ; echo $$?)),0)
+ifneq ($(strip $(shell [ $(CC_MAJOR) -ge 4 -a $(CC_MINOR) -ge 1 ] ; echo $$?)),0)
OPTIMIZATION+=$(call check_cc,$(CC),-mpreferred-stack-boundary=2,)
- OPTIMIZATION+=$(call check_cc,$(CC),-falign-functions=1 -falign-jumps=1 -falign-loops=1,\
- -malign-functions=0 -malign-jumps=0 -malign-loops=0)
-#endif # gcc-4.0 and older
+ OPTIMIZATION+=$(call check_cc,$(CC),-falign-functions=1 -falign-jumps=1 -falign-loops=1, -malign-functions=0 -malign-jumps=0 -malign-loops=0,)
+ # gcc 4.1 produces many broken, totally invalid warnings
+ CHECKED_CFLAGS+=$(call check_cc,$(CC),-Werror,)
+endif # gcc-4.0 and older
+
# gcc-4.1 and beyond seem to benefit from these
ifeq ($(strip $(shell [ $(CC_MAJOR) -ge 4 -a $(CC_MINOR) -ge 1 ] ; echo $$?)),0)
# turn off flags which hurt -Os
More information about the busybox-cvs
mailing list