summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-10-16 22:05:38 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-10-16 22:05:38 +0000
commit531ac824380b57efa300e8fa0480bf30aa0aa169 (patch)
treee9ac628729f12a70a5c583d9b73b341ae9d2ee2d
parenta2ac160535ecf9af28e565aed5c2bd9635844153 (diff)
Add -combine to CFLAGS so gcc-4.1 won't build faulty libs if all sources are built into one object
-rw-r--r--Rules.mak5
1 files changed, 4 insertions, 1 deletions
diff --git a/Rules.mak b/Rules.mak
index 866febae0..031457c64 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -260,6 +260,9 @@ OPTIMIZATION+=$(call check_gcc,-Os,-O2)
# Use the gcc 3.4 -funit-at-a-time optimization when available
OPTIMIZATION+=$(call check_gcc,-funit-at-a-time,)
+# gcc-4.1 fails if -combine is not used and we compile all .c to one object
+CFLAGS_FAIL := $(call check_gcc,-combine,)
+
# Add a bunch of extra pedantic annoyingly strict checks
XWARNINGS=$(subst ",, $(strip $(WARNINGS))) -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
XARCH_CFLAGS=$(subst ",, $(strip $(ARCH_CFLAGS)))
@@ -289,7 +292,7 @@ SSP_CFLAGS:=$(SSP_DISABLE_FLAGS)
endif
# Some nice CFLAGS to work with
-CFLAGS:=$(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \
+CFLAGS:=$(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) $(CFLAGS_FAIL) \
-fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)include -I.
LDFLAGS_NOSTRIP:=$(CPU_LDFLAGS-y) -shared --warn-common --warn-once -z combreloc -z defs