diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2021-05-07 22:38:30 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-09 23:30:16 +0100 |
commit | 48c64d609bcc8066c81898bce9e6e935b3dc1756 (patch) | |
tree | 231c329c38472846a5dfbe2a57d27b0e004b0693 | |
parent | 071fa40b0e4e4545083523b756fb3489ca739492 (diff) | |
download | poky-48c64d609bcc8066c81898bce9e6e935b3dc1756.tar.gz |
libcap: Configure Make variables correctly without a horrible hack
Occasionally, the build would fail with:
make[2]: execvp: mkdir: Argument list too long
This turned out to be due to a hacky solution used in the recipe to
modify the Makefile, which resulted in one more $(BUILD_CFLAGS) being
added to the immediately expanded BUILD_CFLAGS Make variable each time
do_configure was executed. After a couple of times, this lead to an
environment with a 140 kB BUILD_CFLAGS when mkdir should execute, which
resulted in the E2BIG.
(From OE-Core rev: 116e6b61c585c6f0f7ae6f010bd490bb39914348)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-support/libcap/libcap_2.49.bb | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/meta/recipes-support/libcap/libcap_2.49.bb b/meta/recipes-support/libcap/libcap_2.49.bb index 3f4a9256cf..eb9fc5b4b3 100644 --- a/meta/recipes-support/libcap/libcap_2.49.bb +++ b/meta/recipes-support/libcap/libcap_2.49.bb | |||
@@ -20,15 +20,6 @@ UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs | |||
20 | 20 | ||
21 | inherit lib_package | 21 | inherit lib_package |
22 | 22 | ||
23 | # do NOT pass target cflags to host compilations | ||
24 | # | ||
25 | do_configure() { | ||
26 | # libcap uses := for compilers, fortunately, it gives us a hint | ||
27 | # on what should be replaced with ?= | ||
28 | sed -e 's,:=,?=,g' -i Make.Rules | ||
29 | sed -e 's,^BUILD_CFLAGS ?= ,BUILD_CFLAGS := $(BUILD_CFLAGS) ,' -i Make.Rules | ||
30 | } | ||
31 | |||
32 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" | 23 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" |
33 | PACKAGECONFIG_class-native ??= "" | 24 | PACKAGECONFIG_class-native ??= "" |
34 | 25 | ||
@@ -44,11 +35,15 @@ EXTRA_OEMAKE = " \ | |||
44 | 35 | ||
45 | EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}" | 36 | EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}" |
46 | 37 | ||
47 | # these are present in the libcap defaults, so include in our CFLAGS too | ||
48 | CFLAGS += "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" | ||
49 | |||
50 | do_compile() { | 38 | do_compile() { |
51 | oe_runmake ${PACKAGECONFIG_CONFARGS} | 39 | unset CFLAGS BUILD_CFLAGS |
40 | oe_runmake \ | ||
41 | ${PACKAGECONFIG_CONFARGS} \ | ||
42 | AR="${AR}" \ | ||
43 | CC="${CC}" \ | ||
44 | RANLIB="${RANLIB}" \ | ||
45 | COPTS="${CFLAGS}" \ | ||
46 | BUILD_COPTS="${BUILD_CFLAGS}" | ||
52 | } | 47 | } |
53 | 48 | ||
54 | do_install() { | 49 | do_install() { |