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 4d6b136490b7..d2fe1a34e5e0 100644
--- a/Makefile
+++ b/Makefile
@@ -573,8 +573,12 @@ all: vmlinux
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
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.