Skip to content

Commit c252659

Browse files
PolynomialDivisionhauke
authored andcommitted
libcap: update to 2.77
Update to latest release. Add patch `003-Revert-libcap-Add-build-ldflags-to-_makenames-rule.patch` to fix errors in the form of: ``` /usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(__stack_chk_fail.o): relocation R_X86_64_32 against symbol `__stack_chk_guard' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(strerror.o): relocation R_X86_64_32 against `.rodata.errmsgstr' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(realloc.o): relocation R_X86_64_32S against hidden symbol `__malloc_size_classes' can not be used when making a PIE object /usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(__stdout_write.o): relocation R_X86_64_32S against hidden symbol `__stdio_write' can not be used when making a PIE object /usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(ofl.o): relocation R_X86_64_32 against `.bss.ofl_lock' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(stderr.o): warning: relocation against `__stderr_FILE' in read-only section `.rodata.stderr' /usr/bin/ld.bfd: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x12): undefined reference to `__libc_csu_fini' /usr/bin/ld.bfd: (.text+0x19): undefined reference to `__libc_csu_init' collect2: error: ld returned 1 exit status ``` Changes: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/diff/?id=v1.2.77&id2=v1.2.69&dt=2 The apk size did not increase much: Old size for armsr/armv8: 16245 libcap-2.69-r1.apk new size for armsr/armv8: 16315 libcap-2.77-r1.apk Signed-off-by: Nick Hainke <[email protected]> Link: openwrt/openwrt#20881 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent afdbdba commit c252659

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

package/libs/libcap/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
include $(TOPDIR)/rules.mk
77

88
PKG_NAME:=libcap
9-
PKG_VERSION:=2.69
9+
PKG_VERSION:=2.77
1010
PKG_RELEASE:=1
1111

1212
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
1313
PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
14-
PKG_HASH:=f311f8f3dad84699d0566d1d6f7ec943a9298b28f714cae3c931dfd57492d7eb
14+
PKG_HASH:=897bc18b44afc26c70e78cead3dbb31e154acc24bee085a5a09079a88dbf6f52
1515

1616
PKG_MAINTAINER:=Paul Wassi <[email protected]>
1717
PKG_LICENSE:=GPL-2.0-only
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 542d7d86ecd2129dd5fe7e5b31ba307304f5b319 Mon Sep 17 00:00:00 2001
2+
From: "Andrew G. Morgan" <[email protected]>
3+
Date: Mon, 10 Nov 2025 18:26:34 -0800
4+
Subject: [PATCH] Revert "libcap: Add build ldflags to _makenames rule"
5+
6+
This reverts commit c3ddf45d9afaab85d3b7db0dc7bfd1aafb8fde50.
7+
8+
The details of what this broke are here:
9+
10+
https://bugzilla.kernel.org/show_bug.cgi?id=220691#c2
11+
12+
Signed-off-by: Andrew G. Morgan <[email protected]>
13+
---
14+
libcap/Makefile | 2 +-
15+
1 file changed, 1 insertion(+), 1 deletion(-)
16+
17+
--- a/libcap/Makefile
18+
+++ b/libcap/Makefile
19+
@@ -80,7 +80,7 @@ $(PSXTITLE).pc: $(PSXTITLE).pc.in
20+
$< >$@
21+
22+
_makenames: _makenames.c cap_names.list.h
23+
- $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ $(BUILD_LDFLAGS)
24+
+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
25+
26+
cap_names.h: _makenames
27+
./_makenames > cap_names.h

0 commit comments

Comments
 (0)