1 Index: linux-2.4.35.4/arch/mips/Makefile
2 ===================================================================
3 --- linux-2.4.35.4.orig/arch/mips/Makefile
4 +++ linux-2.4.35.4/arch/mips/Makefile
5 @@ -44,10 +44,10 @@ MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
6 GCCFLAGS := -I $(TOPDIR)/include/asm/gcc
7 GCCFLAGS += -G 0 -mno-abicalls -fno-pic -pipe
8 GCCFLAGS += $(call check_gcc, -finline-limit=100000,)
9 -LINKFLAGS += -G 0 -static -n
10 -MODFLAGS += -mlong-calls
11 +LINKFLAGS += -G 0 -static -n -nostdlib
12 +MODFLAGS += -mlong-calls -fno-common
14 -ifdef CONFIG_DEBUG_INFO
15 +ifdef CONFIG_REMOTE_DEBUG
17 ifdef CONFIG_SB1XXX_CORELIS
18 GCCFLAGS += -mno-sched-prolog -fno-omit-frame-pointer
19 @@ -69,13 +69,13 @@ endif
20 set_gccflags = $(shell \
22 cpu=$(1); isa=-$(2); \
23 - for gcc_opt in -march= -mcpu=; do \
24 + for gcc_opt in -march= -mtune=; do \
25 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
26 -xc /dev/null > /dev/null 2>&1 && \
29 cpu=$(3); isa=-$(4); \
30 - for gcc_opt in -march= -mcpu=; do \
31 + for gcc_opt in -march= -mtune=; do \
32 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
33 -xc /dev/null > /dev/null 2>&1 && \
35 @@ -90,7 +90,7 @@ else \
37 gas_abi=-Wa,-32; gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \
39 - for gas_opt in -Wa,-march= -Wa,-mcpu=; do \
40 + for gas_opt in -Wa,-march= -Wa,-mtune=; do \
41 $(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \
42 -o /dev/null -xassembler /dev/null > /dev/null 2>&1 && \
44 @@ -172,6 +172,7 @@ endif
48 +ASFLAGS += $(GCCFLAGS)
52 Index: linux-2.4.35.4/Makefile
53 ===================================================================
54 --- linux-2.4.35.4.orig/Makefile
55 +++ linux-2.4.35.4/Makefile
56 @@ -17,7 +17,7 @@ HPATH = $(TOPDIR)/include
57 FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH)/math-emu
60 -HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
61 +HOSTCFLAGS = -Wall -Wstrict-prototypes -Os -fomit-frame-pointer
65 @@ -88,10 +88,9 @@ export MODLIB
70 CPPFLAGS := -D__KERNEL__ -I$(HPATH)
72 -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
73 +CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
74 -fno-strict-aliasing -fno-common
75 CFLAGS += -fno-builtin-strpbrk -fno-builtin-sprintf
76 ifndef CONFIG_FRAME_POINTER
77 @@ -105,6 +104,8 @@ if_gcc4 = $(shell if echo __GNUC__ | $(C
78 # disable pointer signedness warnings in gcc 4.0
79 CFLAGS += $(call check_gcc,-Wno-pointer-sign,)
81 +CFLAGS += $(call check_gcc, -funit-at-a-time,)
84 # ROOT_DEV specifies the default root-device when making the image.
85 # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case