aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-05-09 16:39:15 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2020-05-17 18:52:01 +0900
commitb1183b6dca3e0d59ce8fa81767def6ea6188e8ec (patch)
tree0ddba79b19f44ad98ae7e918601c531462f4d52b /init
parentbpfilter: match bit size of bpfilter_umh to that of the kernel (diff)
downloadlinux-dev-b1183b6dca3e0d59ce8fa81767def6ea6188e8ec.tar.xz
linux-dev-b1183b6dca3e0d59ce8fa81767def6ea6188e8ec.zip
bpfilter: check if $(CC) can link static libc in Kconfig
On Fedora, linking static glibc requires the glibc-static RPM package, which is not part of the glibc-devel package. CONFIG_CC_CAN_LINK does not check the capability of static linking, so you can enable CONFIG_BPFILTER_UMH, then fail to build: HOSTLD net/bpfilter/bpfilter_umh /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status Add CONFIG_CC_CAN_LINK_STATIC, and make CONFIG_BPFILTER_UMH depend on it. Reported-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig5
1 files changed, 5 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index b2ce83c2e84c..fb8ab85de7f8 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -49,6 +49,11 @@ config CC_CAN_LINK
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(m64-flag)) if 64BIT
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(m32-flag))
+config CC_CAN_LINK_STATIC
+ bool
+ default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) -static $(m64-flag)) if 64BIT
+ default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) -static $(m32-flag))
+
config CC_HAS_ASM_GOTO
def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))