1 Index: linux-2.4.35.4/arch/mips/Makefile
2 ===================================================================
3 --- linux-2.4.35.4.orig/arch/mips/Makefile 2007-12-15 05:19:44.870978088 +0100
4 +++ linux-2.4.35.4/arch/mips/Makefile 2007-12-15 05:19:50.987326639 +0100
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
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 && \
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 && \
48 +ASFLAGS += $(GCCFLAGS)
52 Index: linux-2.4.35.4/Makefile
53 ===================================================================
54 --- linux-2.4.35.4.orig/Makefile 2007-12-15 05:19:45.074989715 +0100
55 +++ linux-2.4.35.4/Makefile 2007-12-15 05:19:50.995327098 +0100
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
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
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