package/libcap: needs MMU
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 13 Sep 2020 16:50:48 +0000 (18:50 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 13 Sep 2020 19:56:18 +0000 (21:56 +0200)
libcap uses fork() since version 2.33 and
https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git/commit/?id=ef485973d5547431782f9e5f4323eabfebb38622

So add MMU dependency to avoid the following build failure on
applications using libcap without MMU such as ntp:

/tmp/instance-0/output-1/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: /tmp/instance-0/output-1/host/bin/../arm-buildroot-uclinux-uclibcgnueabi/sysroot/usr/lib/libcap.a(cap_proc.o): in function `cap_launch':
/tmp/instance-0/output-1/build/libcap-2.42/libcap/cap_proc.c:912: undefined reference to `fork'

All packages that select BR2_PACKAGE_LIBCAP already have a BR2_USE_MMU
dependency, so none of them have to be changed.

Fixes:

 - http://autobuild.buildroot.org/results/89f39dae01c07977062b909079bfcd45a68060d3

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libcap/Config.in

index 5b0c827191f930ee3b11cc8fbf2c81dd983d2580..1fb2e7caec42242495fbb2e096dd5c14979b0ea4 100644 (file)
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBCAP
        bool "libcap"
+       depends on BR2_USE_MMU # fork()
        help
          This library implements the user-space interfaces to the
          POSIX 1003.1e capabilities available in Linux kernels. These
@@ -12,7 +13,6 @@ if BR2_PACKAGE_LIBCAP
 
 config BR2_PACKAGE_LIBCAP_TOOLS
        bool "install tools"
-       depends on BR2_USE_MMU
        help
          Install setcap, getcap, getpcaps and capsh tools.