diff options
author | Andrew Morton <akpm@osdl.org> | 2003-12-29 05:44:10 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-12-29 05:44:10 -0800 |
commit | ffd0cf49cd09ff1ef6495691d3dc076151454f14 (patch) | |
tree | b3486609f012ec13a7f2a3f3524f8f7477687c53 /Makefile | |
parent | a93fabd3f90062015859589ee8bf249a1d76a99b (diff) | |
download | history-ffd0cf49cd09ff1ef6495691d3dc076151454f14.tar.gz |
[PATCH] Add `gcc -Os' config option
From: Adrian Bunk <bunk@fs.tum.de>
Allow the kernel to be built with `-Os'.
It requires CONFIG_EMBEDDED. This is to make it "hard to get at" because
one gcc version (3.2.x I think) from RH9 generates crashy kernels with this
option set.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile index acc02ef8710142..2b2b841b7e5ff2 100644 --- a/Makefile +++ b/Makefile @@ -275,7 +275,7 @@ NOSTDINC_FLAGS = -nostdinc -iwithprefix include CPPFLAGS := -D__KERNEL__ -Iinclude \ $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) -CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ +CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common AFLAGS := -D__ASSEMBLY__ @@ -431,6 +431,12 @@ libs-y := $(libs-y1) $(libs-y2) # --------------------------------------------------------------------------- +ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE +CFLAGS += -Os +else +CFLAGS += -O2 +endif + ifndef CONFIG_FRAME_POINTER CFLAGS += -fomit-frame-pointer endif |