summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 98ff2fc627b7..775c562c7363 100644
--- a/Makefile
+++ b/Makefile
@@ -561,8 +561,12 @@ all: vmlinux
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
else
+ifdef CONFIG_LESS_GCC_OPT
+KBUILD_CLFAGS += -O1
+else
KBUILD_CFLAGS += -O2
endif
+endif
# conserve stack if available
# do this early so that an architecture can override it.