2009-05-15 10:36:04 +00:00
|
|
|
--- a/arch/mips/Makefile
|
|
|
|
+++ b/arch/mips/Makefile
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -44,10 +44,10 @@ MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
|
2005-11-11 21:56:15 +00:00
|
|
|
GCCFLAGS := -I $(TOPDIR)/include/asm/gcc
|
|
|
|
GCCFLAGS += -G 0 -mno-abicalls -fno-pic -pipe
|
|
|
|
GCCFLAGS += $(call check_gcc, -finline-limit=100000,)
|
|
|
|
-LINKFLAGS += -G 0 -static -n
|
|
|
|
-MODFLAGS += -mlong-calls
|
|
|
|
+LINKFLAGS += -G 0 -static -n -nostdlib
|
|
|
|
+MODFLAGS += -mlong-calls -fno-common
|
|
|
|
|
|
|
|
-ifdef CONFIG_DEBUG_INFO
|
|
|
|
+ifdef CONFIG_REMOTE_DEBUG
|
|
|
|
GCCFLAGS += -g
|
|
|
|
ifdef CONFIG_SB1XXX_CORELIS
|
|
|
|
GCCFLAGS += -mno-sched-prolog -fno-omit-frame-pointer
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -69,13 +69,13 @@ endif
|
2005-11-11 21:56:15 +00:00
|
|
|
set_gccflags = $(shell \
|
|
|
|
while :; do \
|
|
|
|
cpu=$(1); isa=-$(2); \
|
|
|
|
- for gcc_opt in -march= -mcpu=; do \
|
|
|
|
+ for gcc_opt in -march= -mtune=; do \
|
|
|
|
$(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
|
|
|
|
-xc /dev/null > /dev/null 2>&1 && \
|
|
|
|
break 2; \
|
|
|
|
done; \
|
|
|
|
cpu=$(3); isa=-$(4); \
|
|
|
|
- for gcc_opt in -march= -mcpu=; do \
|
|
|
|
+ for gcc_opt in -march= -mtune=; do \
|
|
|
|
$(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
|
|
|
|
-xc /dev/null > /dev/null 2>&1 && \
|
|
|
|
break 2; \
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -90,7 +90,7 @@ else \
|
2005-11-11 21:56:15 +00:00
|
|
|
fi; \
|
|
|
|
gas_abi=-Wa,-32; gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \
|
|
|
|
while :; do \
|
|
|
|
- for gas_opt in -Wa,-march= -Wa,-mcpu=; do \
|
|
|
|
+ for gas_opt in -Wa,-march= -Wa,-mtune=; do \
|
|
|
|
$(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \
|
|
|
|
-o /dev/null -xassembler /dev/null > /dev/null 2>&1 && \
|
|
|
|
break 2; \
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -172,6 +172,7 @@ endif
|
2005-11-11 21:56:15 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
AFLAGS += $(GCCFLAGS)
|
|
|
|
+ASFLAGS += $(GCCFLAGS)
|
|
|
|
CFLAGS += $(GCCFLAGS)
|
|
|
|
|
|
|
|
LD += -m $(ld-emul)
|
2009-05-15 10:36:04 +00:00
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -17,7 +17,7 @@ HPATH = $(TOPDIR)/include
|
2005-12-16 11:34:19 +00:00
|
|
|
FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH)/math-emu
|
|
|
|
|
|
|
|
HOSTCC = gcc
|
|
|
|
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
|
|
|
|
+HOSTCFLAGS = -Wall -Wstrict-prototypes -Os -fomit-frame-pointer
|
|
|
|
|
|
|
|
CROSS_COMPILE =
|
|
|
|
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -88,10 +88,9 @@ export MODLIB
|
2005-12-16 11:34:19 +00:00
|
|
|
#
|
|
|
|
# standard CFLAGS
|
|
|
|
#
|
|
|
|
-
|
|
|
|
CPPFLAGS := -D__KERNEL__ -I$(HPATH)
|
|
|
|
|
|
|
|
-CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
|
|
|
|
+CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
|
|
|
|
-fno-strict-aliasing -fno-common
|
2008-01-06 19:28:07 +00:00
|
|
|
CFLAGS += -fno-builtin-strpbrk -fno-builtin-sprintf
|
2005-12-16 11:34:19 +00:00
|
|
|
ifndef CONFIG_FRAME_POINTER
|
2009-09-10 10:06:35 +00:00
|
|
|
@@ -108,6 +107,8 @@ CFLAGS += $(call check_gcc,-Wno-pointer-
|
|
|
|
# disable stupid and dangerous "optimization" in gcc 3.2+
|
|
|
|
CFLAGS += $(call check_gcc,-fno-delete-null-pointer-checks,)
|
2005-12-16 11:34:19 +00:00
|
|
|
|
|
|
|
+CFLAGS += $(call check_gcc, -funit-at-a-time,)
|
|
|
|
+
|
|
|
|
#
|
|
|
|
# ROOT_DEV specifies the default root-device when making the image.
|
|
|
|
# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
|