summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDave Hansen <dave@linux.vnet.ibm.com>2013-07-01 13:04:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-04 11:25:39 -0700
commit6dfc06651b3d29aa07ed99b8075e5d324f7a953a (patch)
treee4ae4a93c349456e894da04689a6deaae3063e75 /lib
parent881c5149543a3a391ab6ce2ebe70235924f15d9c (diff)
downloadlinux-6dfc06651b3d29aa07ed99b8075e5d324f7a953a.tar.gz
linux-6dfc06651b3d29aa07ed99b8075e5d324f7a953a.tar.xz
consolidate compilation option configs
Original Post: http://lkml.kernel.org/r/20121214184207.6E00DDEC@kernel.stglabs.ibm.com Again, trying to come up with some common themes of the stuff in the kernel hacking menu... There are quite a few options to tweak compilation in some way, or perform extra compile-time checks. Give them their own menu. The diff here looks a bit funny... makes it look like I'm moving debugfs even though I'm actually moving the options on either side of it. Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.debug156
1 files changed, 80 insertions, 76 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6fdead79ee15..70dfda31c8aa 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -25,6 +25,34 @@ config DEFAULT_MESSAGE_LOGLEVEL
that are auditing their logs closely may want to set it to a lower
priority.
+menu "Compile-time checks and compiler options"
+
+config DEBUG_INFO
+ bool "Compile the kernel with debug info"
+ depends on DEBUG_KERNEL
+ help
+ If you say Y here the resulting kernel image will include
+ debugging info resulting in a larger kernel image.
+ This adds debug symbols to the kernel and modules (gcc -g), and
+ is needed if you intend to use kernel crashdump or binary object
+ tools like crash, kgdb, LKCD, gdb, etc on the kernel.
+ Say Y here only if you plan to debug the kernel.
+
+ If unsure, say N.
+
+config DEBUG_INFO_REDUCED
+ bool "Reduce debugging information"
+ depends on DEBUG_INFO
+ help
+ If you say Y here gcc is instructed to generate less debugging
+ information for structure types. This means that tools that
+ need full debugging information (like kgdb or systemtap) won't
+ be happy. But if you merely need debugging information to
+ resolve line numbers there is no loss. Advantage is that
+ build directory object sizes shrink dramatically over a full
+ DEBUG_INFO build and compile times are reduced too.
+ Only works with newer gcc versions.
+
config ENABLE_WARN_DEPRECATED
bool "Enable __deprecated logic"
default y
@@ -52,20 +80,6 @@ config FRAME_WARN
Setting it to 0 disables the warning.
Requires gcc 4.4
-config MAGIC_SYSRQ
- bool "Magic SysRq key"
- depends on !UML
- help
- If you say Y here, you will have some control over the system even
- if the system crashes for example during kernel debugging (e.g., you
- will be able to flush the buffer cache to disk, reboot the system
- immediately or dump some status information). This is accomplished
- by pressing various keys while holding SysRq (Alt+PrintScreen). It
- also works on a serial console (on PC hardware at least), if you
- send a BREAK and then within 5 seconds a command keypress. The
- keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
- unless you really know what this hack does.
-
config STRIP_ASM_SYMS
bool "Strip assembler-generated symbols during link"
default n
@@ -156,6 +170,58 @@ config DEBUG_SECTION_MISMATCH
- Enable verbose reporting from modpost in order to help resolve
the section mismatches that are reported.
+#
+# Select this config option from the architecture Kconfig, if it
+# is preferred to always offer frame pointers as a config
+# option on the architecture (regardless of KERNEL_DEBUG):
+#
+config ARCH_WANT_FRAME_POINTERS
+ bool
+ help
+
+config FRAME_POINTER
+ bool "Compile the kernel with frame pointers"
+ depends on DEBUG_KERNEL && \
+ (CRIS || M68K || FRV || UML || \
+ AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \
+ ARCH_WANT_FRAME_POINTERS
+ default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
+ help
+ If you say Y here the resulting kernel image will be slightly
+ larger and slower, but it gives very useful debugging information
+ in case of kernel bugs. (precise oopses/stacktraces/warnings)
+
+config DEBUG_FORCE_WEAK_PER_CPU
+ bool "Force weak per-cpu definitions"
+ depends on DEBUG_KERNEL
+ help
+ s390 and alpha require percpu variables in modules to be
+ defined weak to work around addressing range issue which
+ puts the following two restrictions on percpu variable
+ definitions.
+
+ 1. percpu symbols must be unique whether static or not
+ 2. percpu variables can't be defined inside a function
+
+ To ensure that generic code follows the above rules, this
+ option forces all percpu variables to be defined as weak.
+
+endmenu # "Compiler options"
+
+config MAGIC_SYSRQ
+ bool "Magic SysRq key"
+ depends on !UML
+ help
+ If you say Y here, you will have some control over the system even
+ if the system crashes for example during kernel debugging (e.g., you
+ will be able to flush the buffer cache to disk, reboot the system
+ immediately or dump some status information). This is accomplished
+ by pressing various keys while holding SysRq (Alt+PrintScreen). It
+ also works on a serial console (on PC hardware at least), if you
+ send a BREAK and then within 5 seconds a command keypress. The
+ keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
+ unless you really know what this hack does.
+
config DEBUG_KERNEL
bool "Kernel debugging"
help
@@ -816,32 +882,6 @@ config DEBUG_BUGVERBOSE
of the BUG call as well as the EIP and oops trace. This aids
debugging but costs about 70-100K of memory.
-config DEBUG_INFO
- bool "Compile the kernel with debug info"
- depends on DEBUG_KERNEL
- help
- If you say Y here the resulting kernel image will include
- debugging info resulting in a larger kernel image.
- This adds debug symbols to the kernel and modules (gcc -g), and
- is needed if you intend to use kernel crashdump or binary object
- tools like crash, kgdb, LKCD, gdb, etc on the kernel.
- Say Y here only if you plan to debug the kernel.
-
- If unsure, say N.
-
-config DEBUG_INFO_REDUCED
- bool "Reduce debugging information"
- depends on DEBUG_INFO
- help
- If you say Y here gcc is instructed to generate less debugging
- information for structure types. This means that tools that
- need full debugging information (like kgdb or systemtap) won't
- be happy. But if you merely need debugging information to
- resolve line numbers there is no loss. Advantage is that
- build directory object sizes shrink dramatically over a full
- DEBUG_INFO build and compile times are reduced too.
- Only works with newer gcc versions.
-
config DEBUG_WRITECOUNT
bool "Debug filesystem writers count"
depends on DEBUG_KERNEL
@@ -896,27 +936,6 @@ config DEBUG_CREDENTIALS
If unsure, say N.
-#
-# Select this config option from the architecture Kconfig, if it
-# is preferred to always offer frame pointers as a config
-# option on the architecture (regardless of KERNEL_DEBUG):
-#
-config ARCH_WANT_FRAME_POINTERS
- bool
- help
-
-config FRAME_POINTER
- bool "Compile the kernel with frame pointers"
- depends on DEBUG_KERNEL && \
- (CRIS || M68K || FRV || UML || \
- AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \
- ARCH_WANT_FRAME_POINTERS
- default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
- help
- If you say Y here the resulting kernel image will be slightly
- larger and slower, but it gives very useful debugging information
- in case of kernel bugs. (precise oopses/stacktraces/warnings)
-
config BOOT_PRINTK_DELAY
bool "Delay each boot printk message by N milliseconds"
depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
@@ -1100,21 +1119,6 @@ config DEBUG_BLOCK_EXT_DEVT
Say N if you are unsure.
-config DEBUG_FORCE_WEAK_PER_CPU
- bool "Force weak per-cpu definitions"
- depends on DEBUG_KERNEL
- help
- s390 and alpha require percpu variables in modules to be
- defined weak to work around addressing range issue which
- puts the following two restrictions on percpu variable
- definitions.
-
- 1. percpu symbols must be unique whether static or not
- 2. percpu variables can't be defined inside a function
-
- To ensure that generic code follows the above rules, this
- option forces all percpu variables to be defined as weak.
-
config NOTIFIER_ERROR_INJECTION
tristate "Notifier error injection"
depends on DEBUG_KERNEL