summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBernard Ogden <Bernard.Ogden@arm.com>2009-09-23 10:33:25 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2009-09-23 12:43:11 +0100
commit30bb6551675d2dfddeb3f7fda0f3af3aa753df12 (patch)
tree714e2aab8b417e1d19f2b6e06acb6126a8881b82 /Makefile
parent03da00fa0b53645fedc495fac18d7965da52e6e1 (diff)
Lower (-O1) kernel build optimisation
This patch allows the kernel to be compiled with -O1 for easier source-level debugging. The patch was slightly modify by Catalin Marinas to avoid the "oldconfig" target asking the optimisation level for already configured kernels. Signed-off-by: Bernard Ogden <Bernard.Ogden@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6525e260f2be..26c0137af65f 100644
--- a/Makefile
+++ b/Makefile
@@ -512,8 +512,12 @@ all: vmlinux
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
else
+ifdef CONFIG_CC_OPTIMIZE_FOR_DEBUG
+KBUILD_CFLAGS += -O1
+else
KBUILD_CFLAGS += -O2
endif
+endif
include $(srctree)/arch/$(SRCARCH)/Makefile