@@ -25,6 +25,34 @@ config DEFAULT_MESSAGE_LOGLEVEL
25
25
that are auditing their logs closely may want to set it to a lower
26
26
priority.
27
27
28
+ menu "Compile-time checks and compiler options"
29
+
30
+ config DEBUG_INFO
31
+ bool "Compile the kernel with debug info"
32
+ depends on DEBUG_KERNEL
33
+ help
34
+ If you say Y here the resulting kernel image will include
35
+ debugging info resulting in a larger kernel image.
36
+ This adds debug symbols to the kernel and modules (gcc -g), and
37
+ is needed if you intend to use kernel crashdump or binary object
38
+ tools like crash, kgdb, LKCD, gdb, etc on the kernel.
39
+ Say Y here only if you plan to debug the kernel.
40
+
41
+ If unsure, say N.
42
+
43
+ config DEBUG_INFO_REDUCED
44
+ bool "Reduce debugging information"
45
+ depends on DEBUG_INFO
46
+ help
47
+ If you say Y here gcc is instructed to generate less debugging
48
+ information for structure types. This means that tools that
49
+ need full debugging information (like kgdb or systemtap) won't
50
+ be happy. But if you merely need debugging information to
51
+ resolve line numbers there is no loss. Advantage is that
52
+ build directory object sizes shrink dramatically over a full
53
+ DEBUG_INFO build and compile times are reduced too.
54
+ Only works with newer gcc versions.
55
+
28
56
config ENABLE_WARN_DEPRECATED
29
57
bool "Enable __deprecated logic"
30
58
default y
@@ -52,20 +80,6 @@ config FRAME_WARN
52
80
Setting it to 0 disables the warning.
53
81
Requires gcc 4.4
54
82
55
- config MAGIC_SYSRQ
56
- bool "Magic SysRq key"
57
- depends on !UML
58
- help
59
- If you say Y here, you will have some control over the system even
60
- if the system crashes for example during kernel debugging (e.g., you
61
- will be able to flush the buffer cache to disk, reboot the system
62
- immediately or dump some status information). This is accomplished
63
- by pressing various keys while holding SysRq (Alt+PrintScreen). It
64
- also works on a serial console (on PC hardware at least), if you
65
- send a BREAK and then within 5 seconds a command keypress. The
66
- keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
67
- unless you really know what this hack does.
68
-
69
83
config STRIP_ASM_SYMS
70
84
bool "Strip assembler-generated symbols during link"
71
85
default n
@@ -156,6 +170,58 @@ config DEBUG_SECTION_MISMATCH
156
170
- Enable verbose reporting from modpost in order to help resolve
157
171
the section mismatches that are reported.
158
172
173
+ #
174
+ # Select this config option from the architecture Kconfig, if it
175
+ # is preferred to always offer frame pointers as a config
176
+ # option on the architecture (regardless of KERNEL_DEBUG):
177
+ #
178
+ config ARCH_WANT_FRAME_POINTERS
179
+ bool
180
+ help
181
+
182
+ config FRAME_POINTER
183
+ bool "Compile the kernel with frame pointers"
184
+ depends on DEBUG_KERNEL && \
185
+ (CRIS || M68K || FRV || UML || \
186
+ AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \
187
+ ARCH_WANT_FRAME_POINTERS
188
+ default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
189
+ help
190
+ If you say Y here the resulting kernel image will be slightly
191
+ larger and slower, but it gives very useful debugging information
192
+ in case of kernel bugs. (precise oopses/stacktraces/warnings)
193
+
194
+ config DEBUG_FORCE_WEAK_PER_CPU
195
+ bool "Force weak per-cpu definitions"
196
+ depends on DEBUG_KERNEL
197
+ help
198
+ s390 and alpha require percpu variables in modules to be
199
+ defined weak to work around addressing range issue which
200
+ puts the following two restrictions on percpu variable
201
+ definitions.
202
+
203
+ 1. percpu symbols must be unique whether static or not
204
+ 2. percpu variables can't be defined inside a function
205
+
206
+ To ensure that generic code follows the above rules, this
207
+ option forces all percpu variables to be defined as weak.
208
+
209
+ endmenu # "Compiler options"
210
+
211
+ config MAGIC_SYSRQ
212
+ bool "Magic SysRq key"
213
+ depends on !UML
214
+ help
215
+ If you say Y here, you will have some control over the system even
216
+ if the system crashes for example during kernel debugging (e.g., you
217
+ will be able to flush the buffer cache to disk, reboot the system
218
+ immediately or dump some status information). This is accomplished
219
+ by pressing various keys while holding SysRq (Alt+PrintScreen). It
220
+ also works on a serial console (on PC hardware at least), if you
221
+ send a BREAK and then within 5 seconds a command keypress. The
222
+ keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
223
+ unless you really know what this hack does.
224
+
159
225
config DEBUG_KERNEL
160
226
bool "Kernel debugging"
161
227
help
@@ -816,32 +882,6 @@ config DEBUG_BUGVERBOSE
816
882
of the BUG call as well as the EIP and oops trace. This aids
817
883
debugging but costs about 70-100K of memory.
818
884
819
- config DEBUG_INFO
820
- bool "Compile the kernel with debug info"
821
- depends on DEBUG_KERNEL
822
- help
823
- If you say Y here the resulting kernel image will include
824
- debugging info resulting in a larger kernel image.
825
- This adds debug symbols to the kernel and modules (gcc -g), and
826
- is needed if you intend to use kernel crashdump or binary object
827
- tools like crash, kgdb, LKCD, gdb, etc on the kernel.
828
- Say Y here only if you plan to debug the kernel.
829
-
830
- If unsure, say N.
831
-
832
- config DEBUG_INFO_REDUCED
833
- bool "Reduce debugging information"
834
- depends on DEBUG_INFO
835
- help
836
- If you say Y here gcc is instructed to generate less debugging
837
- information for structure types. This means that tools that
838
- need full debugging information (like kgdb or systemtap) won't
839
- be happy. But if you merely need debugging information to
840
- resolve line numbers there is no loss. Advantage is that
841
- build directory object sizes shrink dramatically over a full
842
- DEBUG_INFO build and compile times are reduced too.
843
- Only works with newer gcc versions.
844
-
845
885
config DEBUG_WRITECOUNT
846
886
bool "Debug filesystem writers count"
847
887
depends on DEBUG_KERNEL
@@ -896,27 +936,6 @@ config DEBUG_CREDENTIALS
896
936
897
937
If unsure, say N.
898
938
899
- #
900
- # Select this config option from the architecture Kconfig, if it
901
- # is preferred to always offer frame pointers as a config
902
- # option on the architecture (regardless of KERNEL_DEBUG):
903
- #
904
- config ARCH_WANT_FRAME_POINTERS
905
- bool
906
- help
907
-
908
- config FRAME_POINTER
909
- bool "Compile the kernel with frame pointers"
910
- depends on DEBUG_KERNEL && \
911
- (CRIS || M68K || FRV || UML || \
912
- AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \
913
- ARCH_WANT_FRAME_POINTERS
914
- default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
915
- help
916
- If you say Y here the resulting kernel image will be slightly
917
- larger and slower, but it gives very useful debugging information
918
- in case of kernel bugs. (precise oopses/stacktraces/warnings)
919
-
920
939
config BOOT_PRINTK_DELAY
921
940
bool "Delay each boot printk message by N milliseconds"
922
941
depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
@@ -1100,21 +1119,6 @@ config DEBUG_BLOCK_EXT_DEVT
1100
1119
1101
1120
Say N if you are unsure.
1102
1121
1103
- config DEBUG_FORCE_WEAK_PER_CPU
1104
- bool "Force weak per-cpu definitions"
1105
- depends on DEBUG_KERNEL
1106
- help
1107
- s390 and alpha require percpu variables in modules to be
1108
- defined weak to work around addressing range issue which
1109
- puts the following two restrictions on percpu variable
1110
- definitions.
1111
-
1112
- 1. percpu symbols must be unique whether static or not
1113
- 2. percpu variables can't be defined inside a function
1114
-
1115
- To ensure that generic code follows the above rules, this
1116
- option forces all percpu variables to be defined as weak.
1117
-
1118
1122
config NOTIFIER_ERROR_INJECTION
1119
1123
tristate "Notifier error injection"
1120
1124
depends on DEBUG_KERNEL
0 commit comments