summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-08-22 22:51:09 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-08-24 08:10:00 +0900
commite85d1d65cd8a9083040e280d172eba762875f8f1 (patch)
tree8038ed2a967ad92502f45a7173bdda15cfed57b7 /init
parentf6f57a46435d7253a52a1a07a58183678ad266a0 (diff)
downloadlinux-e85d1d65cd8a9083040e280d172eba762875f8f1.tar.bz2
kbuild: test dead code/data elimination support in Kconfig
This config option should be enabled only when both the compiler and the linker support necessary flags. Add proper dependencies to Kconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig2
1 files changed, 2 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 9bd50ba8253f..21b855921eaf 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1085,6 +1085,8 @@ config LD_DEAD_CODE_DATA_ELIMINATION
bool "Dead code and data elimination (EXPERIMENTAL)"
depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
depends on EXPERT
+ depends on $(cc-option,-ffunction-sections -fdata-sections)
+ depends on $(ld-option,--gc-sections)
help
Enable this if you want to do dead code and data elimination with
the linker by compiling with -ffunction-sections -fdata-sections,