2010-11-03 18:13:33 +02:00
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
2011-04-03 16:59:07 +03:00
|
|
|
@@ -538,9 +538,9 @@ endif # $(dot-config)
|
2011-03-26 03:07:16 +02:00
|
|
|
all: vmlinux
|
|
|
|
|
2010-11-03 18:13:33 +02:00
|
|
|
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
2011-03-26 03:07:16 +02:00
|
|
|
-KBUILD_CFLAGS += -Os
|
|
|
|
+KBUILD_CFLAGS += -Os -fno-caller-saves
|
2010-11-03 18:13:33 +02:00
|
|
|
else
|
|
|
|
-KBUILD_CFLAGS += -O2
|
2011-03-26 03:07:16 +02:00
|
|
|
+KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch -fno-caller-saves
|
2010-11-03 18:13:33 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
include $(srctree)/arch/$(SRCARCH)/Makefile
|
2011-04-03 16:59:07 +03:00
|
|
|
@@ -595,6 +595,9 @@ endif
|
2010-11-03 18:13:33 +02:00
|
|
|
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
|
|
|
|
CHECKFLAGS += $(NOSTDINC_FLAGS)
|
|
|
|
|
|
|
|
+# improve gcc optimization
|
|
|
|
+CFLAGS += $(call cc-option,-funit-at-a-time,)
|
|
|
|
+
|
|
|
|
# warn about C99 declaration after statement
|
|
|
|
KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
|
|
|
|
|