From 418d24936f73f3d9108133a325f1c1a479b37e09 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 29 Aug 2026 17:53:02 +0900 Subject: internal/rosa/package/elfutils: 0.195 to 0.196 Signed-off-by: Ophestra --- internal/rosa/package/elfutils.az | 49 --------------- .../64e89606ff4967a647525524aec00dd33765ba2a.patch | 71 ++++++++++++++++++++++ internal/rosa/package/elfutils/package.az | 50 +++++++++++++++ 3 files changed, 121 insertions(+), 49 deletions(-) delete mode 100644 internal/rosa/package/elfutils.az create mode 100644 internal/rosa/package/elfutils/64e89606ff4967a647525524aec00dd33765ba2a.patch create mode 100644 internal/rosa/package/elfutils/package.az diff --git a/internal/rosa/package/elfutils.az b/internal/rosa/package/elfutils.az deleted file mode 100644 index 42cc1c56..00000000 --- a/internal/rosa/package/elfutils.az +++ /dev/null @@ -1,49 +0,0 @@ -package elfutils { - description = "utilities and libraries to handle ELF files and DWARF data"; - website = "https://sourceware.org/elfutils"; - anitya = 5679; - - version# = "0.195"; - source = remoteTar { - url = "https://sourceware.org/elfutils/ftp/"+ - version+"/elfutils-"+version+".tar.bz2"; - checksum = "JrGnBD38w8Mj0ZxDw3fKlRBFcLvRKu8rcYnX35R9yTlUSYnzTazyLboG-a2CsJlu"; - compress = bzip2; - }; - - env = [ - "CC=cc" + - // nonstandard glibc extension - " -DFNM_EXTMATCH=0", - ]; - - exec = make { - configure = { - "enable-deterministic-archives"; - }; - - // nonstandard glibc extension - check = nil; - }; - - inputs = [ - m4, - pkgconf, - - zlib, - bzip2, - zstd, - argp-standalone, - musl-fts, - musl-obstack, - kernel-headers, - ]; - - runtime = [ - zlib, - bzip2, - zstd, - musl-fts, - musl-obstack, - ]; -} diff --git a/internal/rosa/package/elfutils/64e89606ff4967a647525524aec00dd33765ba2a.patch b/internal/rosa/package/elfutils/64e89606ff4967a647525524aec00dd33765ba2a.patch new file mode 100644 index 00000000..e7b534f1 --- /dev/null +++ b/internal/rosa/package/elfutils/64e89606ff4967a647525524aec00dd33765ba2a.patch @@ -0,0 +1,71 @@ +From 64e89606ff4967a647525524aec00dd33765ba2a Mon Sep 17 00:00:00 2001 +From: Daeho Ro +Date: Sun, 16 Aug 2026 16:27:56 +0900 +Subject: [PATCH] backends: use instead of for struct + iovec + +Since commit 0e8b57a3 ("elfcompress: Handle existing output files +(symlinks)") lib/system.h includes . When _GNU_SOURCE is +defined, glibc's pulls in (via +bits/fcntl-linux.h), which defines struct iovec. The kernel UAPI header + defines struct iovec unconditionally, so including it +after "system.h" now breaks the aarch64 backend build: + + In file included from aarch64_initreg.c:36: + /usr/include/linux/uio.h:17:8: error: redefinition of 'struct iovec' + 17 | struct iovec + | ^~~~~ + In file included from /usr/include/aarch64-linux-gnu/bits/fcntl-linux.h:38, + from /usr/include/aarch64-linux-gnu/bits/fcntl.h:61, + from /usr/include/fcntl.h:35, + from ../lib/system.h:42, + from aarch64_initreg.c:33: + /usr/include/aarch64-linux-gnu/bits/types/struct_iovec.h:26:8: note: originally defined here + +Seen building 0.196 on aarch64 with glibc 2.39 and gcc 13.3.0. + +Both files only need struct iovec to call ptrace (PTRACE_GETREGSET), +which glibc provides in ; that header guards the definition +with __iovec_defined, so it composes with the rest of system.h. +arm_initreg.c does not currently include "system.h" and so still builds, +but it has the same latent conflict. + +* backends/aarch64_initreg.c: Include instead of + . +* backends/arm_initreg.c: Likewise. + +Signed-off-by: Daeho Ro +--- + backends/aarch64_initreg.c | 2 +- + backends/arm_initreg.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c +index a6badbb4..539a6366 100644 +--- a/backends/aarch64_initreg.c ++++ b/backends/aarch64_initreg.c +@@ -33,7 +33,7 @@ + #include "system.h" + #include + #if defined(__aarch64__) && defined(__linux__) +-# include ++# include + # include + # include + # include +diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c +index efcabaf6..062bb9e0 100644 +--- a/backends/arm_initreg.c ++++ b/backends/arm_initreg.c +@@ -38,7 +38,7 @@ + #endif + + #ifdef __aarch64__ +-# include ++# include + # include + # include + /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ +-- +2.55.0 + diff --git a/internal/rosa/package/elfutils/package.az b/internal/rosa/package/elfutils/package.az new file mode 100644 index 00000000..89db25ff --- /dev/null +++ b/internal/rosa/package/elfutils/package.az @@ -0,0 +1,50 @@ +package elfutils { + description = "utilities and libraries to handle ELF files and DWARF data"; + website = "https://sourceware.org/elfutils"; + anitya = 5679; + + version# = "0.196"; + source = remoteTar { + url = "https://sourceware.org/elfutils/ftp/"+ + version+"/elfutils-"+version+".tar.bz2"; + checksum = "TzY1z0jDRofYNxhEsElwgzSKWUy2Hb6RSzm_8ni-peGKmZWLJUqefZItJtw-ZvHj"; + compress = bzip2; + }; + patches = [ "64e89606ff4967a647525524aec00dd33765ba2a.patch" ]; + + env = [ + "CC=cc" + + // nonstandard glibc extension + " -DFNM_EXTMATCH=0", + ]; + + exec = make { + configure = { + "enable-deterministic-archives"; + }; + + // nonstandard glibc extension + check = nil; + }; + + inputs = [ + m4, + pkgconf, + + zlib, + bzip2, + zstd, + argp-standalone, + musl-fts, + musl-obstack, + kernel-headers, + ]; + + runtime = [ + zlib, + bzip2, + zstd, + musl-fts, + musl-obstack, + ]; +} -- cgit v1.3.1