diff mbox series

[3/6] kernel: add DEBUG_INFO_REDUCED config option

Message ID 20220227115726.1272270-3-stijn@linux-ipv6.be
State Changes Requested
Delegated to: Stijn Tintel
Headers show
Series [1/6] layerscape/armv8_64b: enable DEBUG_INFO_REDUCED | expand

Commit Message

Stijn Tintel Feb. 27, 2022, 11:57 a.m. UTC
Add DEBUG_INFO_REDUCED as a kernel config option and remove it from the
kernel configs. This is in preparation of the upcoming option to enable
BTF typeinfo, which is incompatible with DEBUG_INFO_REDUCED.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---
 config/Config-kernel.in          | 14 ++++++++++++++
 target/linux/generic/config-5.10 |  1 -
 target/linux/generic/config-5.4  |  1 -
 3 files changed, 14 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index 31d4e276fd..6ba40e15fd 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -368,6 +368,20 @@  config KERNEL_DEBUG_INFO
 	help
 	  This will compile your kernel and modules with debug information.
 
+config KERNEL_DEBUG_INFO_REDUCED
+	bool "Reduce debugging information"
+	default y
+	depends on KERNEL_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 KERNEL_DEBUG_LL_UART_NONE
 	bool
 	default n
diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index c6a34eea13..87c5153b58 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -1274,7 +1274,6 @@  CONFIG_DEBUG_FS_ALLOW_ALL=y
 # CONFIG_DEBUG_INFO_BTF is not set
 # CONFIG_DEBUG_INFO_COMPRESSED is not set
 # CONFIG_DEBUG_INFO_DWARF4 is not set
-CONFIG_DEBUG_INFO_REDUCED=y
 # CONFIG_DEBUG_INFO_SPLIT is not set
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_KMEMLEAK is not set
diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index 899d04c669..141dbfb233 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -1193,7 +1193,6 @@  CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_INFO_BTF is not set
 # CONFIG_DEBUG_INFO_DWARF4 is not set
-CONFIG_DEBUG_INFO_REDUCED=y
 # CONFIG_DEBUG_INFO_SPLIT is not set
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_KMEMLEAK is not set