libpng, zsh: two more GCC 14+ strictness regressions
libpng
contrib/libtests/pngvalid.c calls feenableexcept(), a glibc extension
relibc does not provide, and GCC 14+ makes the implicit declaration an
error. It is a test program, so build it the way AGENTS.md
§ CONVENTIONS already prescribes for cross builds -- '--disable-tests'.
The library is unaffected; only check_PROGRAMS is skipped, and those
binaries cannot run on the build host regardless.
zsh
zsh 5.9 probes for the termcap symbol arrays with
char **test = boolcodes; puts(*test);
and ncurses declares boolcodes as 'const char * const *'. GCC 14
promoted -Wincompatible-pointer-types to an error, so the probe stopped
compiling, configure concluded boolcodes=no, HAVE_BOOLCODES was left
undefined, and Src/Modules/termcap.c fell back to defining its own
array -- colliding with the header:
termcap.c:45: error: conflicting types for 'boolcodes'
The probe uses a bare shell variable, not an ac_cv_ cache entry, so
there is nothing to override; restoring the pre-GCC-14 severity is what
lets it reach the right answer. Scoped to this recipe so the rest of the
tree keeps the stricter default.
Both cook clean.
This commit is contained in:
@@ -17,5 +17,17 @@ template = "custom"
|
||||
dependencies = ["zlib"]
|
||||
script = """
|
||||
DYNAMIC_STATIC_INIT
|
||||
# Do not build the test harness when cross-compiling, per AGENTS.md
|
||||
# § CONVENTIONS ("Cross-compilation tests: Disable test suites when
|
||||
# cross-compiling"). contrib/libtests/pngvalid.c calls feenableexcept(),
|
||||
# a glibc extension relibc does not provide, so with GCC 14+ turning
|
||||
# implicit declarations into errors the test program fails the build:
|
||||
# pngvalid.c:11716: error: implicit declaration of function
|
||||
# 'feenableexcept'
|
||||
# The library itself is unaffected -- only check_PROGRAMS is skipped, and
|
||||
# those binaries cannot run on the build host anyway.
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-tests
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
@@ -21,6 +21,18 @@ dependencies = [
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
# zsh 5.9 predates GCC 14, which promoted -Wincompatible-pointer-types from a
|
||||
# warning to an error. Its configure probe for the termcap symbol arrays is
|
||||
# char **test = boolcodes; puts(*test);
|
||||
# and ncurses declares boolcodes as `const char * const *`, so under GCC 16 the
|
||||
# probe no longer compiles. configure then concludes boolcodes=no, leaves
|
||||
# HAVE_BOOLCODES undefined, and Src/Modules/termcap.c falls back to defining
|
||||
# its own array -- which collides with the header:
|
||||
# termcap.c:45: error: conflicting types for 'boolcodes'; have 'char *[]'
|
||||
# Restore the pre-GCC-14 severity so the probes reach the right answers. Scoped
|
||||
# to this recipe: the rest of the tree keeps the stricter default.
|
||||
export CFLAGS+=" -Wno-error=incompatible-pointer-types"
|
||||
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--srcdir="${COOKBOOK_SOURCE}"
|
||||
--disable-gdbm
|
||||
|
||||
Reference in New Issue
Block a user