prplos/tools/cmake/patches
Hauke Mehrtens c510069ea2 tools/cmake: backport bootstrap fix for GCC 16
CMake fails to bootstrap its host tool with GCC 16:

    cmake.o: undefined reference to
    `cmGlobalGhsMultiGenerator::cmGlobalGhsMultiGenerator(cmake*)'

Source/cmake.cxx includes cmGlobalGhsMultiGenerator.h guarded only by
__linux__, not by CMAKE_BOOTSTRAP. The NewFactory() call is compiled out
during bootstrap, but GCC 16 devirtualization still emits the uncalled
inline NewFactory() and the cmGlobalGeneratorSimpleFactory<> template,
which reference symbols only defined in cmGlobalGhsMultiGenerator.cxx, a
file that is not compiled during bootstrap.

Backport the upstream fix, which moves the include behind the existing
CMAKE_BOOTSTRAP guard. It is in no 3.30.x release (that branch is EOL);
upstream shipped it first in 3.31.10 / 4.0.5 / 4.1.2.

Assisted-by: Claude:claude-opus-4-8
Link: https://github.com/openwrt/openwrt/pull/24303
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit ee6e56c82ef738199312e3eb28df40806ddf41cf)
2026-08-18 11:40:42 +01:00
..
010-bootstrap-Fix-compilation-with-gcc-16-devirtualizati.patch tools/cmake: backport bootstrap fix for GCC 16 2026-08-18 11:40:42 +01:00
100-no-testing.patch
110-liblzma.patch
120-curl-fix-libressl-linking.patch
130-bootstrap_parallel_make_flag.patch
140-zlib.patch
150-zstd-libarchive.patch
160-disable_xcode_generator.patch tools/cmake: backport bootstrap fix for GCC 16 2026-08-18 11:40:42 +01:00