-
Notifications
You must be signed in to change notification settings - Fork 8k
Update libtool to newer version #21067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Nice work! I can't judge if this will give other side effect. But I can confirm that this will resolve the $PATH quotation issue. If merged PR #21065 will be obsolete. |
|
Hello, we can try updating this, yes. In my PR (#13476) I've tried to avoid having multiple libtool m4 files for simplicity - there they are merged into a single m4 file. Otherwise, scripts/phpize.m4 and scripts/phpize.in would also need to be adjusted for this a bit further. And, probably having some basic updating script for libtool would be useful probably here. Otherwise, another thing we can try here is to remove all libtool related files in php-src and use the |
Did it this way, since I want to keep closer to libtool upstream.
Working on a script to update autotools stuff. WRT last paragraph. if we do want to stop vendoring libtool, said script would be useful as a basis for how we want to invoke libtoolize. |
|
Can you please also mention in the final commit message some of these: And please rename the |
|
Here, I'd suggest to also recheck if these two code snippets |
This doesn't seem to be necessary anymore: "Configuring libtool" output with
|
|
This PR also makes it easier to build with LTO: Before this PR, building with This PR fixes that. |
|
Can you please also rebase and squash all these commits into a single one so it's easier to apply this patch locally for testing. |
The libtool 1.5.26 is bundled with PHP since the very early days of the
Autotools build system to ease the building process and avoid additional
dependency on the system Libtool. This updates the bundled libtool to
2.5.4 version.
Fixes and implementations:
- Fixed race conditions when building PHP in parallel ("cannot create
.libs" warnings).
- Implements request #70374 (Update libtool.m4)
- Fixes libtool eating -flto flags.
Changes:
- Add a script to update autotools files.
- libtool is spread across multiple files; phpize is updates to handle
this.
- On macOS linker now uses -undefined dynamic_lookup flag for shared
extensions and shared embed SAPI (libphp) instead of older
'-undefined suppress -flat_namespace' combination.
325b36a to
76582d2
Compare
|
Tested also on Solaris 10 with Autoconf 2.69 and up using some unrelated patches so that it builds. Everything works ok. If it works there, it will work everywhere where it's relevant for PHP. There might be some issues with some outdated macOS systems or in cases where some special linker is used that we aren't aware of yet. I can't test on AIX but that system is problematic by default anyway for anything already. I doubt any recent PHP version can be even built there without some major patching. I'll test more when GitHub comes back (currently it has some issues). |
The version of libtool we're using is old enough to vote, and occasionally issues crop up related to it (i.e. this should fix GH-17310 incidentally). Update it to the latest version from upstream (serial 63 from 2.5.4). I don't believe we carry any patches that don't just replicate fixes in newer versions, so it should be OK to just use upstream's version. Newer libtool has more files that we have to include manually if not using aclocal, and some macro names were changed, so adapt to this.
Tested on linux/ppc64 and macos/arm64, with autoconf 2.72. I'm a little worried about the impact this might have on other platforms since this is a major bump. In particular, AIX might be turbulent, since library naming conventions changed a lot in libtool.