From: Ryan Hope Date: Wed, 14 May 2008 17:34:34 +0000 (-0400) Subject: add strip-debug X-Git-Tag: v2.6.26-rc6-zen1~15^2 X-Git-Url: http://zen-sources.org/cgi-bin/gitweb.cgi?p=kernel.git;a=commitdiff_plain;h=0c7adcf457e112cdefb47f55d9bffb18909646ca add strip-debug --- diff --git a/Makefile b/Makefile index 6923d66..405d9c8 100644 --- a/Makefile +++ b/Makefile @@ -515,6 +515,13 @@ endif # Arch Makefiles may override this setting KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) +#Strips debugging symbols if enabled +#Use only if you want a super small kernel +#Without the ability to debug +ifdef CONFIG_CC_STRIP_DEBUG +KBUILD_CFLAGS += -s +endif + include $(srctree)/arch/$(SRCARCH)/Makefile ifdef CONFIG_FRAME_POINTER diff --git a/init/Kconfig b/init/Kconfig index 6199d11..68b042b 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -524,6 +524,19 @@ config CC_OPTIMIZE_FOR_SIZE If unsure, say N. +config CC_STRIP_DEBUG + bool "Strip Debugging Symbols" + default n + depends on EXPERIMENTAL + help + Enabling this option will pass "-s" to gcc, which strips debug + symbols, resulting in a MUCH smaller kernel. + + WARNING: Use this only if you don't plan on using a debugger, + or debug information. + + If unsure, say N. + config SYSCTL bool