diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2021-05-07 22:38:30 +0200 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2021-05-11 13:16:37 +0800 |
commit | 44900610bea76ab8983a899599f78790f6c5f659 (patch) | |
tree | 77c4fb06b85d5a56bb4b2f17176b21a523fd1be2 /meta/recipes-support/libcap | |
parent | 86bcab9e9f4ee5e06f7db8c75d4b983fd2be59d2 (diff) | |
download | openembedded-core-contrib-44900610bea76ab8983a899599f78790f6c5f659.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.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 116e6b61c585c6f0f7ae6f010bd490bb39914348)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'meta/recipes-support/libcap')
-rw-r--r-- | meta/recipes-support/libcap/libcap_2.48.bb | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/meta/recipes-support/libcap/libcap_2.48.bb b/meta/recipes-support/libcap/libcap_2.48.bb index a12738d63a..2f83acf966 100644 --- a/meta/recipes-support/libcap/libcap_2.48.bb +++ b/meta/recipes-support/libcap/libcap_2.48.bb @@ -20,15 +20,6 @@ UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs inherit lib_package -# do NOT pass target cflags to host compilations -# -do_configure() { - # libcap uses := for compilers, fortunately, it gives us a hint - # on what should be replaced with ?= - sed -e 's,:=,?=,g' -i Make.Rules - sed -e 's,^BUILD_CFLAGS ?= ,BUILD_CFLAGS := $(BUILD_CFLAGS) ,' -i Make.Rules -} - PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" PACKAGECONFIG_class-native ??= "" @@ -44,11 +35,15 @@ EXTRA_OEMAKE = " \ EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}" -# these are present in the libcap defaults, so include in our CFLAGS too -CFLAGS += "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" - do_compile() { - oe_runmake ${PACKAGECONFIG_CONFARGS} + unset CFLAGS BUILD_CFLAGS + oe_runmake \ + ${PACKAGECONFIG_CONFARGS} \ + AR="${AR}" \ + CC="${CC}" \ + RANLIB="${RANLIB}" \ + COPTS="${CFLAGS}" \ + BUILD_COPTS="${BUILD_CFLAGS}" } do_install() { |