init/Kconfig: add CONFIG_CC_CAN_LINK
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 1 Jul 2019 00:58:39 +0000 (09:58 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 7 Jul 2019 17:25:59 +0000 (02:25 +0900)
Currently, scripts/cc-can-link.sh is run just for BPFILTER_UMH, but
defining CC_CAN_LINK will be useful in other places.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
init/Kconfig
net/bpfilter/Kconfig

index df5bba27e3fe35f5f8117cd392289c2669d3b222..2e9813daa2c128d2417daed4a639bd5bdac0885d 100644 (file)
@@ -24,6 +24,9 @@ config CLANG_VERSION
        int
        default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
 
+config CC_CAN_LINK
+       def_bool $(success,$(srctree)/scripts/cc-can-link.sh $(CC))
+
 config CC_HAS_ASM_GOTO
        def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))
 
index 91f9d878165ebf16e49cdeb419a19052ed415b86..fed9290e3b41f94a566df19203f552d351e99c5b 100644 (file)
@@ -9,7 +9,7 @@ menuconfig BPFILTER
 if BPFILTER
 config BPFILTER_UMH
        tristate "bpfilter kernel module with user mode helper"
-       depends on $(success,$(srctree)/scripts/cc-can-link.sh $(CC))
+       depends on CC_CAN_LINK
        default m
        help
          This builds bpfilter kernel module with embedded user mode helper