diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-10-21 22:08:06 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-27 11:37:43 +0000 |
| commit | 7c8852a5992f0c199faa5063d06a41c533c9cdfd (patch) | |
| tree | 7940de2fb085091384ccbc483cefca9feadbc308 | |
| parent | 9ff81e0a51b3137244f333147af5adf7495b5b5d (diff) | |
| download | poky-7c8852a5992f0c199faa5063d06a41c533c9cdfd.tar.gz | |
libcap: Pass OE defined BUILD_CC and BUILD_LDFLAGS
This ensures that, native pieces in target builds
are build with correct flags to be able to run on build host
(From OE-Core rev: c82e49d1707f2057baa3f7fbaeea0b785712a11f)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-support/libcap/files/0001-libcap-Add-build-ldflags-to-_makenames-rule.patch | 29 | ||||
| -rw-r--r-- | meta/recipes-support/libcap/libcap_2.76.bb | 6 |
2 files changed, 34 insertions, 1 deletions
diff --git a/meta/recipes-support/libcap/files/0001-libcap-Add-build-ldflags-to-_makenames-rule.patch b/meta/recipes-support/libcap/files/0001-libcap-Add-build-ldflags-to-_makenames-rule.patch new file mode 100644 index 0000000000..10ddf64935 --- /dev/null +++ b/meta/recipes-support/libcap/files/0001-libcap-Add-build-ldflags-to-_makenames-rule.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | From e52d3232882c263f5bd4b1980195ac633d706a53 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 21 Oct 2025 18:27:51 -0700 | ||
| 4 | Subject: [PATCH] libcap: Add build ldflags to _makenames rule | ||
| 5 | |||
| 6 | its calling compiler and linker in single step | ||
| 7 | ensure that build ldflags are respected as it | ||
| 8 | might have important information like which runtime | ||
| 9 | to use. | ||
| 10 | |||
| 11 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=c3ddf45d9afaab85d3b7db0dc7bfd1aafb8fde50] | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | libcap/Makefile | 2 +- | ||
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/libcap/Makefile b/libcap/Makefile | ||
| 18 | index e90a950..f0eb87e 100644 | ||
| 19 | --- a/libcap/Makefile | ||
| 20 | +++ b/libcap/Makefile | ||
| 21 | @@ -80,7 +80,7 @@ $(PSXTITLE).pc: $(PSXTITLE).pc.in | ||
| 22 | $< >$@ | ||
| 23 | |||
| 24 | _makenames: _makenames.c cap_names.list.h | ||
| 25 | - $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ | ||
| 26 | + $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ $(BUILD_LDFLAGS) | ||
| 27 | |||
| 28 | cap_names.h: _makenames | ||
| 29 | ./_makenames > cap_names.h | ||
diff --git a/meta/recipes-support/libcap/libcap_2.76.bb b/meta/recipes-support/libcap/libcap_2.76.bb index c842246fc0..27093ff3e7 100644 --- a/meta/recipes-support/libcap/libcap_2.76.bb +++ b/meta/recipes-support/libcap/libcap_2.76.bb | |||
| @@ -12,7 +12,9 @@ LIC_FILES_CHKSUM = "file://License;md5=2965a646645b72ecee859b43c592dcaa \ | |||
| 12 | 12 | ||
| 13 | DEPENDS = "hostperl-runtime-native gperf-native" | 13 | DEPENDS = "hostperl-runtime-native gperf-native" |
| 14 | 14 | ||
| 15 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz" | 15 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ |
| 16 | file://0001-libcap-Add-build-ldflags-to-_makenames-rule.patch \ | ||
| 17 | " | ||
| 16 | SRC_URI:append:class-nativesdk = " \ | 18 | SRC_URI:append:class-nativesdk = " \ |
| 17 | file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ | 19 | file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ |
| 18 | " | 20 | " |
| @@ -37,6 +39,8 @@ EXTRA_OEMAKE = " \ | |||
| 37 | do_compile() { | 39 | do_compile() { |
| 38 | oe_runmake \ | 40 | oe_runmake \ |
| 39 | AR="${AR}" \ | 41 | AR="${AR}" \ |
| 42 | BUILD_CC="${BUILD_CC}" \ | ||
| 43 | BUILD_LDFLAGS="${BUILD_LDFLAGS}" \ | ||
| 40 | CC="${CC}" \ | 44 | CC="${CC}" \ |
| 41 | RANLIB="${RANLIB}" \ | 45 | RANLIB="${RANLIB}" \ |
| 42 | OBJCOPY="${OBJCOPY}" | 46 | OBJCOPY="${OBJCOPY}" |
