Skip to content

libraries: honour SPC_DEFAULT_CFLAGS/CXXFLAGS/LDFLAGS and bug fixes#1166

Open
henderkes wants to merge 1 commit into
v3from
v3c/library-fixes
Open

libraries: honour SPC_DEFAULT_CFLAGS/CXXFLAGS/LDFLAGS and bug fixes#1166
henderkes wants to merge 1 commit into
v3from
v3c/library-fixes

Conversation

@henderkes
Copy link
Copy Markdown
Collaborator

bzip2, fastlz, jbig, qdbm: thread SPC_DEFAULT_CFLAGS into the hand-rolled Makefile patches and shell compile commands. Backward compatible when the env var is empty.

icu: append SPC_DEFAULT_CXXFLAGS/LDFLAGS to runConfigureICU's CXXFLAGS and LDFLAGS so user flags reach the bundled cxx invocation.

openssl: append user CFLAGS/LDFLAGS after the target name on Configure so options like -flto and -fprofile-* reach the openssl build.

liblz4: replace placeholder Makefile patch ("installewfwef") with a real one that compiles each lib source individually -- clang -flto -c with multiple inputs only writes a .o for the first, silently dropping the rest and leaving liblz4.a with a single object.

libheif: rewrite libheif 1.22+'s C-incompatible
struct heif_bad_pixel { uint32_t row; uint32_t column; }; as a typedef so C consumers compile.

ncurses: filter the clang/zig-cc "N warning(s) generated." stdout line out of MKlib_gen.sh's preprocessor pipe before sed turns it into invalid C in lib_gen.c.

libaom: detect target CPU from SystemTarget instead of hard-coding generic, fall back to generic only when neither nasm nor yasm is available, and turn off examples/tests/tools/docs.

What does this PR do?

Checklist before merging

  • If you modified *.php or *.yml, run them locally to ensure your changes are valid:
    • composer cs-fix
    • composer analyse
    • composer test
    • bin/spc dev:lint-config

bzip2, fastlz, jbig, qdbm: thread SPC_DEFAULT_CFLAGS into the
hand-rolled Makefile patches and shell compile commands. Backward
compatible when the env var is empty.

icu: append SPC_DEFAULT_CXXFLAGS/LDFLAGS to runConfigureICU's CXXFLAGS
and LDFLAGS so user flags reach the bundled cxx invocation.

openssl: append user CFLAGS/LDFLAGS after the target name on Configure
so options like -flto and -fprofile-* reach the openssl build.

libheif: rewrite libheif 1.22+'s C-incompatible
`struct heif_bad_pixel { uint32_t row; uint32_t column; };` as a
typedef so C consumers compile.

ncurses: filter the clang/zig-cc "N warning(s) generated." stdout line
out of MKlib_gen.sh's preprocessor pipe before sed turns it into
invalid C in lib_gen.c.

libaom: detect target CPU from SystemTarget instead of hard-coding
generic, fall back to generic only when neither nasm nor yasm is
available, and turn off examples/tests/tools/docs.
@henderkes henderkes force-pushed the v3c/library-fixes branch from c53f6ad to 29a8c9c Compare May 24, 2026 14:28
@crazywhalecc crazywhalecc added the need-test This PR has not been tested yet, cannot merge now label May 24, 2026
@github-actions
Copy link
Copy Markdown

StaticPHP Test Bot

Detected: Extensions: none | Libraries: bzip2, fastlz, icu, jbig, libaom, libheif, ncurses, openssl, qdbm | Targets: none
Active labels: none
Config: Linux x86_64 + Windows x86_64 + macOS arm64 | PHP 8.5 NTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need-test This PR has not been tested yet, cannot merge now

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants