1 diff -ur linux-2.4.32/arch/mips/Makefile linux-2.4.32-openwrt/arch/mips/Makefile
2 --- linux-2.4.32/arch/mips/Makefile 2005-12-15 13:53:59.000000000 +0100
3 +++ linux-2.4.32-openwrt/arch/mips/Makefile 2005-12-15 14:02:33.000000000 +0100
5 GCCFLAGS := -I $(TOPDIR)/include/asm/gcc
6 GCCFLAGS += -G 0 -mno-abicalls -fno-pic -pipe
7 GCCFLAGS += $(call check_gcc, -finline-limit=100000,)
8 -LINKFLAGS += -G 0 -static -n
9 -MODFLAGS += -mlong-calls
10 +LINKFLAGS += -G 0 -static -n -nostdlib
11 +MODFLAGS += -mlong-calls -fno-common
13 -ifdef CONFIG_DEBUG_INFO
14 +ifdef CONFIG_REMOTE_DEBUG
16 ifdef CONFIG_SB1XXX_CORELIS
17 GCCFLAGS += -mno-sched-prolog -fno-omit-frame-pointer
19 set_gccflags = $(shell \
21 cpu=$(1); isa=-$(2); \
22 - for gcc_opt in -march= -mcpu=; do \
23 + for gcc_opt in -march= -mtune=; do \
24 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
25 -xc /dev/null > /dev/null 2>&1 && \
28 cpu=$(3); isa=-$(4); \
29 - for gcc_opt in -march= -mcpu=; do \
30 + for gcc_opt in -march= -mtune=; do \
31 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
32 -xc /dev/null > /dev/null 2>&1 && \
36 gas_abi=-Wa,-32; gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \
38 - for gas_opt in -Wa,-march= -Wa,-mcpu=; do \
39 + for gas_opt in -Wa,-march= -Wa,-mtune=; do \
40 $(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \
41 -o /dev/null -xassembler /dev/null > /dev/null 2>&1 && \
47 +ASFLAGS += $(GCCFLAGS)
51 diff -ur linux-2.4.32/Makefile linux-2.4.32-openwrt/Makefile
52 --- linux-2.4.32/Makefile 2005-12-15 13:53:59.000000000 +0100
53 +++ linux-2.4.32-openwrt/Makefile 2005-12-15 13:59:30.000000000 +0100
55 FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH)/math-emu
58 -HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
59 +HOSTCFLAGS = -Wall -Wstrict-prototypes -Os -fomit-frame-pointer
68 CPPFLAGS := -D__KERNEL__ -I$(HPATH)
70 -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
71 +CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
72 -fno-strict-aliasing -fno-common
73 CFLAGS += -fno-builtin-sprintf
74 ifndef CONFIG_FRAME_POINTER
76 # disable pointer signedness warnings in gcc 4.0
77 CFLAGS += $(call check_gcc,-Wno-pointer-sign,)
79 +CFLAGS += $(call check_gcc, -funit-at-a-time,)
82 # ROOT_DEV specifies the default root-device when making the image.
83 # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case