Forward-port the genuinely-new fixes from feat/pgo (2026-06-09 .. 07-09)
into v3's reorganized layout:
- zig-cc.sh: prefix runtime-lib appends with `-x none` so the profile/crt/
cpu_model archives don't poison the following files as `-x c` sources
- ZigToolchain: set ax_cv_have_func_attribute_ifunc=no under -flto
(an ifunc in LTO bitcode crashes zig 0.16's lld during thin-link)
- php configure: add --with-sysconfdir option; strip build-time env vars
from phpinfo's "Configure Command"
- ext-brotli / ext-zstd: switch to stable release/tag tarballs; brotli
configures with --with-libbrotli
- ext-event: patch libevent http_connection.c to use a const peer address
(both static and shared builds)
- ghrel downloader: prefer GitHub's /releases/latest (the semantically
latest stable release) over publish-order iteration, so a newer-tagged
prerelease (e.g. libevent 2.2.x-alpha) can't win over 2.1.x-stable
Commits already present in v3 were skipped: protobuf-latest + libaom
ENABLE_*=OFF (9398a667), the clang runtime -target flag (2adedc09), the
runtime-bits fail-hard half of 3823631a, and github prefer-stable's
prerelease skip (incl. the ghtar /releases/latest path, already in v3).
mongo-php-driver 2.3.3 added a config.m4 check that falls back to
php-config when PHP_VERSION_ID is unset in the shell env. In-tree
PHP source builds have no php-config, so configure fails with:
checking PHP version... configure: error: php-config not found
Set PHP_VERSION_ID from main/php_version.h before configureForUnix
so the lookup short-circuits.
ftp.gnu.org is unreliable and frequently times out during CI builds.
ftpmirror.gnu.org is GNU's own CDN that auto-redirects to the nearest
mirror. This is the recommended download method per
https://www.gnu.org/prep/ftp.en.html
Also normalizes /pub/gnu/ paths to /gnu/ since ftpmirror only serves
the latter.
Affects: libiconv, gettext, gmp, idn2, libunistring, ncurses, readline
-fno-plt is an ELF-only flag that has no effect on macOS Mach-O
targets — clang emits "argument unused" when it encounters it.
Libraries like xz that run -Werror sanity checks during configure
promote that warning to a fatal error, breaking the build.
vswhere.exe defaults to searching Community, Professional, and
Enterprise editions only. CI environments typically install the
lightweight Build Tools product which is a separate product type
(Microsoft.VisualStudio.Product.BuildTools). Without -products *
the tool returns no results and the build fails with "Visual Studio
with C++ tools not found".
See: https://github.com/microsoft/vswhere/wiki/Find-MSBuild