diff options
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | lib/Kconfig.debug | 13 |
2 files changed, 17 insertions, 0 deletions
| @@ -557,6 +557,10 @@ KBUILD_CFLAGS += -g | |||
| 557 | KBUILD_AFLAGS += -gdwarf-2 | 557 | KBUILD_AFLAGS += -gdwarf-2 |
| 558 | endif | 558 | endif |
| 559 | 559 | ||
| 560 | ifdef CONFIG_DEBUG_INFO_REDUCED | ||
| 561 | KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) | ||
| 562 | endif | ||
| 563 | |||
| 560 | ifdef CONFIG_FUNCTION_TRACER | 564 | ifdef CONFIG_FUNCTION_TRACER |
| 561 | KBUILD_CFLAGS += -pg | 565 | KBUILD_CFLAGS += -pg |
| 562 | endif | 566 | endif |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 25c3ed594c54..2af5d84ec824 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -595,6 +595,19 @@ config DEBUG_INFO | |||
| 595 | 595 | ||
| 596 | If unsure, say N. | 596 | If unsure, say N. |
| 597 | 597 | ||
| 598 | config DEBUG_INFO_REDUCED | ||
| 599 | bool "Reduce debugging information" | ||
| 600 | depends on DEBUG_INFO | ||
| 601 | help | ||
| 602 | If you say Y here gcc is instructed to generate less debugging | ||
| 603 | information for structure types. This means that tools that | ||
| 604 | need full debugging information (like kgdb or systemtap) won't | ||
| 605 | be happy. But if you merely need debugging information to | ||
| 606 | resolve line numbers there is no loss. Advantage is that | ||
| 607 | build directory object sizes shrink dramatically over a full | ||
| 608 | DEBUG_INFO build and compile times are reduced too. | ||
| 609 | Only works with newer gcc versions. | ||
| 610 | |||
| 598 | config DEBUG_VM | 611 | config DEBUG_VM |
| 599 | bool "Debug VM" | 612 | bool "Debug VM" |
| 600 | depends on DEBUG_KERNEL | 613 | depends on DEBUG_KERNEL |
