FS#17259 - [php] stomps over user-set LDFLAGS rather than doing a precise filter of --as-needed
Attached to Project:
Arch Linux
Opened by Devin Cofer (Ranguvar) - Monday, 23 November 2009, 22:41 GMT
Last edited by Pierre Schmitz (Pierre) - Tuesday, 24 November 2009, 20:10 GMT
Opened by Devin Cofer (Ranguvar) - Monday, 23 November 2009, 22:41 GMT
Last edited by Pierre Schmitz (Pierre) - Tuesday, 24 November 2009, 20:10 GMT
|
Details
php-5.3.1-3 completely overrides the user's set LDFLAGS.
Apparently this is because the default flag '--as-needed' breaks ldap-sasl compilation. However, the better solution would be to just filter that flag, so as not to stomp all over the user's other settings. I believe the following two lines, in order, cover both the default and any other use of --as-needed. They should be used instead of the current 'export LDFLAGS="-Wl,--hash-style=gnu"'. export LDFLAGS="${LDFLAGS//-Wl,--as-needed}" export LDFLAGS="${LDFLAGS//,--as-needed}" |
This task depends upon
Closed by Pierre Schmitz (Pierre)
Tuesday, 24 November 2009, 20:10 GMT
Reason for closing: Implemented
Tuesday, 24 November 2009, 20:10 GMT
Reason for closing: Implemented
Even with the default LDFLAGS settings, you're still losing out on some optimization, because it gets rid of --hash-style=gnu.
Even if a !ldflags option shows up, I think there should be a !asneeded option...
--as-needed is by far the most problematic LDFLAG, despite it being the most helpful, and that would make it nicer to avoid problems while still respecting the user's settings.
After all, this is a fairly hardcore distro ;-) I think people choose it so that they're the master of their software.
It's a bit annoying to check every PKGBUILD before ABS build to make sure it isn't making bad decisions about how to compile.
Anyways, no big deal, just seems more logical to only override what is necessary.