Jeffrey Walton <noloader@xxxxxxxxx> writes: > I think the solution is to update Make so that there are separate > LD_EXE_FLAGS and LD_SO_FLAGS. But that was rejected too... Yeah, I understand both the reason why the idea was rejected and the reason why it's appealing. Autoconf isn't the place to look for new flags to pass only to shared library links (which I think would be the right way to go about that), but the Automake folks might be interested in talking that over. I've run into a few places where I'd like to do that as well (for example, -Wl,-Bsymbolic). Currently, the way this works in the Automake world is that the shared library builds are done via Libtool, which adds the appropriate additional flags for shared libraries on the local platform. This generally works quite well, but so far as I know there isn't a good way to do that globally across the project. You can set individual flags for specific libraries with the _LDFLAGS setting in Automake, but that's for the developer (since it requires modifying Makefile.am), not for the person doing the compile. This would be something that would need to be added to Automake, at least as I understand it. In any event, I don't think passing -Wl,-shared into a configure script is ever going to make sense unless I'm missing some subtlety. That flag is specifically for creating shared libraries, and if the package is already building a shared library, it's (necessarily) already going to add that flag in exactly the places where it's appropriate. Note that it is safe to pass -fPIE globally via CFLAGS even if shared libraries (which must use -fPIC instead of -fPIE) are in play provided Libtool is in use, since Libtool is smart enough to not pass -fPIE into shared library builds. -- Russ Allbery (rra@xxxxxxxxxxxx) <http://www.eyrie.org/~eagle/> _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf