]> git.baikalelectronics.ru Git - kernel.git/commit
bpfilter: check if $(CC) can link static libc in Kconfig
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 9 May 2020 07:39:15 +0000 (16:39 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 17 May 2020 09:52:01 +0000 (18:52 +0900)
commit9177d2ccd9e8359a1e3844e63a229bf9cf0f9617
tree0ddba79b19f44ad98ae7e918601c531462f4d52b
parentf80128932cb5fab5f9eca5fa6eabb198e646c0c7
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>
init/Kconfig
net/bpfilter/Kconfig