1 diff -urN linux.old/Makefile linux.dev/Makefile
2 --- linux.old/Makefile 2005-08-26 13:41:41.689634168 +0200
3 +++ linux.dev/Makefile 2005-08-26 13:44:34.233403528 +0200
5 FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH)/math-emu
8 -HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
9 +HOSTCFLAGS = -Wall -Wstrict-prototypes -Os -fomit-frame-pointer
15 # Include the make variables (CC, etc...)
20 +check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
22 CPPFLAGS := -D__KERNEL__ -I$(HPATH)
24 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
27 CPPFLAGS := -D__KERNEL__ -I$(HPATH)
29 -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
30 +CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
31 -fno-strict-aliasing -fno-common
34 ifndef CONFIG_FRAME_POINTER
35 CFLAGS += -fomit-frame-pointer
39 AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
41 +CFLAGS += $(call check_gcc, -funit-at-a-time,)
48 # ROOT_DEV specifies the default root-device when making the image.
49 # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
50 diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile
51 --- linux.old/arch/mips/Makefile 2005-11-07 23:12:50.582887000 +0100
52 +++ linux.dev/arch/mips/Makefile 2005-11-07 21:57:08.537629000 +0100
54 GCCFLAGS := -I $(TOPDIR)/include/asm/gcc
55 GCCFLAGS += -G 0 -mno-abicalls -fno-pic -pipe
56 GCCFLAGS += $(call check_gcc, -finline-limit=100000,)
57 -LINKFLAGS += -G 0 -static -n
58 -MODFLAGS += -mlong-calls
59 +LINKFLAGS += -G 0 -static -n -nostdlib
60 +MODFLAGS += -mlong-calls -fno-common
62 -ifdef CONFIG_DEBUG_INFO
63 +ifdef CONFIG_REMOTE_DEBUG
65 ifdef CONFIG_SB1XXX_CORELIS
66 GCCFLAGS += -mno-sched-prolog -fno-omit-frame-pointer
68 set_gccflags = $(shell \
70 cpu=$(1); isa=-$(2); \
71 - for gcc_opt in -march= -mcpu=; do \
72 + for gcc_opt in -march= -mtune=; do \
73 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
74 -xc /dev/null > /dev/null 2>&1 && \
77 cpu=$(3); isa=-$(4); \
78 - for gcc_opt in -march= -mcpu=; do \
79 + for gcc_opt in -march= -mtune=; do \
80 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
81 -xc /dev/null > /dev/null 2>&1 && \
85 gas_abi=-Wa,-32; gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \
87 - for gas_opt in -Wa,-march= -Wa,-mcpu=; do \
88 + for gas_opt in -Wa,-march= -Wa,-mtune=; do \
89 $(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \
90 -o /dev/null -xassembler /dev/null > /dev/null 2>&1 && \
96 +ASFLAGS += $(GCCFLAGS)