openwrt-pf/tools
Michael Pratt a3830a1589 tools: gnulib: fix build with latest glibc C23 changes
Backport a patch that covers a build problem with latest glibc
being used as the host standard C library during tools build.

The C23 standard changes some functions that used to drop qualifiers
like "const" or "volatile" and are now forced to preserve them
in the return type based on the input type at all times.
Developers of glibc have responded by making these functions
into macros after they are declared with prototypes.
This is not compatible with the way gnulib is written,
so when the functions are redeclared in gnulib,
the preprocessor expands the _function name_ itself
as if it is a macro name, but not fully,
which results in unusual looking build errors,
e.g. the failed processing of keywords that were never written
and have no business being in a prototype, or,
as a keyword that is expected to be there and nearly guarenteed
to work but mysteriously is not working, displayed as:
"error: expected identifier or '(' before _____".

The backport patch introduces and implements a new macro
in order to prevent function names from being interpreted as macros,
by wrapping it in parentheses for C, or simply placing it back for C++
in the first stage of macro expansion which satisfies the goal
of no further expansion taking place during preprocessing.

Add an additional patch for the functions declared
in the fts header, as this bug also applies to them,
however, this was overlooked by upstream gnulib,
likely because the bug is not presenting as an error.

Yet another patch corrects the order between
specifiers and attributes in GCC syntax for header
lib/fts.in.h which can be blamed on an upstream commit.

Specifically, the throw() or noexcept() keywords
must be before attributes at the end of a declaration.
There are two headers, lib/cdefs.h and lib/getopt-ext.h
that already demonstrate the correct order which is very
strictly necessary in the latest version of GCC
when compiling C++ code, and acceptable for C code,
as the "__THROW" macro is simply another attribute in that case.

Added backport patch:
 - 400-c23-qualifier-generic.patch

Added pending patch:
 - 410-unmacro-fts-functions.patch
 - 450-attribute-specifier-order.patch

Ref: 80e5de158316 ("fts: Improve GCC 11 allocation-deallocation checking.") # gnulib.git
Reported-by: Aditya Nugraha <vortexilation@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24247
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-30 19:40:44 +02:00
..
7z tools/7z: update to 25.01 2025-08-17 11:09:46 +02:00
autoconf tools/autoconf: Fix relocatable patch 2025-02-24 14:12:47 +01:00
autoconf-archive autoconf-archive: backport patch for C++23 support 2025-12-03 20:00:21 +01:00
automake tools: automake: do not error on missing conditional 2026-07-30 19:34:40 +02:00
b43-tools b43-tools: introduce support for rev22 in b43-fwsquash.py 2026-05-28 00:47:45 +02:00
bash tools: bash: fix PKG_HASH 2025-08-11 12:16:18 +02:00
bc tools: bc: update to 1.08.2 2026-06-22 13:01:20 +02:00
bison tools: bison: do not install or uninstall macros 2025-07-30 23:06:30 +02:00
bzip2 tools/bzip2: switch to cmake 2024-04-03 18:56:58 +02:00
cbootimage treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
cbootimage-configs treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
ccache tools/ccache: update to 4.13.3 2026-04-20 08:51:04 +02:00
cmake tools/cmake: update to 4.3.4 2026-06-25 23:13:25 +02:00
coreutils tools/coreutils: provide the rmdir utility 2025-07-26 14:38:08 +02:00
cpio tools: cpio: fix compilation with GCC15 2025-04-17 16:29:18 +02:00
dosfstools treewide: use HTTPS for PKG_SOURCE_URL where possible 2026-04-20 11:58:37 +08:00
dwarves tools/dwarves: update to 1.31 2025-11-22 23:09:51 +01:00
e2fsprogs tools: e2fsprogs: update to version 1.47.4 2026-04-07 01:31:04 +02:00
elftosb treewide: use HTTPS for PKG_SOURCE_URL where possible 2026-04-20 11:58:37 +08:00
elfutils tools/elfutils: enable parallel building 2025-07-26 14:38:09 +02:00
erofs-utils tools/erofs-utils: assign PKG_CPE_ID 2026-03-19 18:05:35 +01:00
expat tools/expat: update to 2.8.2 2026-07-02 16:36:16 +02:00
fakeroot tools/fakeroot: update to 2.1.3 2026-07-11 23:44:48 +02:00
findutils tools/findutils: update to 4.10.0 2024-06-10 13:02:06 +02:00
firmware-utils tools: firmware-utils: update to Git HEAD (2026-07-19) 2026-07-19 21:45:08 +00:00
flex tools/flex: respect STAGING_DIR_HOST 2024-09-24 19:48:43 +01:00
flock tools: add Host/Uninstall where possible 2022-10-20 00:33:22 +02:00
genext2fs tools/genext2fs: update to 1.5.0 2022-10-22 22:53:24 +02:00
gengetopt gengetopt: backport patch fixing support for c++17 2024-05-01 15:45:25 +02:00
gmp tools: gmp: fix compilation with GCC15 2025-04-17 16:29:18 +02:00
gnulib tools: gnulib: fix build with latest glibc C23 changes 2026-07-30 19:40:44 +02:00
include treewide: strip trailing whitespace 2025-05-20 00:47:37 +02:00
isl tools/isl: update to 0.27 2025-03-27 21:44:57 +01:00
libdeflate tools/libdeflate: update to 1.25 2025-11-22 23:07:46 +01:00
liblzo treewide: use HTTPS for PKG_SOURCE_URL where possible 2026-04-20 11:58:37 +08:00
libressl treewide: use HTTPS for PKG_SOURCE_URL where possible 2026-04-20 11:58:37 +08:00
libtool tools: libtool: always install all auxillary files 2025-08-11 22:28:41 +02:00
llvm-bpf tools/llvm-bpf: update to 22.1.3 2026-04-18 09:19:29 +02:00
lz4 tools: lz4: update to 1.10.0 2025-08-05 07:01:07 +02:00
lzma tools: refresh all patches 2024-05-23 11:49:03 +02:00
lzma-old treewide: unify OpenWrt hosted source via @OPENWRT 2021-02-05 12:00:24 -10:00
lzop treewide: use HTTPS for PKG_SOURCE_URL where possible 2026-04-20 11:58:37 +08:00
m4 tools: m4: update to 1.4.21 2026-02-13 16:56:37 +01:00
make-ext4fs make_ext4fs: Update to version 2025-05-02 2025-05-02 17:26:08 +02:00
meson tools/meson: add pending patch to improve binary reproducibility 2025-10-14 17:13:04 +02:00
missing-macros tools/missing-macros: install files from HOST_BUILD_DIR instead of src 2024-05-22 11:53:52 +02:00
mkimage tools/mkimage: update to v2026.07 2026-07-09 13:00:18 +02:00
mklibs tools/mklibs: update to 0.1.45 2022-03-01 00:08:08 +01:00
mold mold: Update to 2.41.0 2026-04-28 09:35:53 +02:00
mpc tools/mpc: use STAGING_DIR_HOST instead of hardcoding default 2023-01-09 21:33:19 +01:00
mpfr treewide: use HTTPS for PKG_SOURCE_URL where possible 2026-04-20 11:58:37 +08:00
mtd-utils tools/mtd-utils: update to v2.3.1 2026-04-16 20:45:40 +02:00
mtools tools: mtools: update to 4.0.49 2025-07-28 00:52:47 +02:00
ninja tools/ninja: update to 1.13.2 2025-11-26 09:37:03 +01:00
padjffs2 tools/padjffs2: use Host/Prepare/Default instead of raw commands 2024-05-22 11:56:45 +02:00
patch tools/patch: bump version to v2.8 2025-04-21 23:55:59 +02:00
patch-image treewide: strip trailing whitespace 2025-05-20 00:47:37 +02:00
patchelf tools/patchelf: update to 0.18.0 2023-04-29 17:37:45 +02:00
pkgconf tools: pkgconf: update to 2.5.1 2025-07-28 00:57:25 +02:00
quilt tools/quilt: update to 0.69 2025-05-22 18:53:24 +02:00
sdimage treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
sed tools: prefer gz or bz2 tarballs 2024-04-06 11:24:18 +02:00
sparse tools/sparse: fix compilation with GCC14 2024-06-16 22:40:42 +02:00
squashfs3-lzma tools/squashfs3-lzma: fix compilation with GCC15 2025-04-23 11:50:13 +02:00
squashfs4 tools/squashfs4: update to 4.7.5 2026-03-04 00:44:09 +01:00
sstrip tools/sstrip: update to 3.2 2021-09-20 15:21:17 +02:00
tar tools: tar: update to 1.35 2024-06-18 19:49:54 +02:00
util-linux tools: util-linux: update to 2.42.2 2026-06-24 02:14:33 +02:00
xxhash tools: xxhash: fix PKG_MIRROR_HASH 2025-10-09 13:37:58 +02:00
xz treewide: use HTTPS for PKG_SOURCE_URL where possible 2026-04-20 11:58:37 +08:00
yafut yafut: update to a version that builds on macOS 2025-02-19 09:37:46 +01:00
zip tools: assign PKG_CPE_ID 2023-09-19 20:21:33 +02:00
zlib tools/zlib: update to 1.3.2 2026-03-14 22:24:13 +01:00
zstd tools: zstd: update to 1.5.7 2025-02-22 20:30:00 +01:00
Makefile tools/util-linux: remove automake dep 2025-11-07 21:18:55 +01:00