http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47225

--- Comment #17 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2011-02-02 
04:53:05 UTC ---
It appears to me that one possible solution is to add the -shared flag to
liblto_plugin_la_LDFLAGS.  This will cause libtool to fail the link if it can't
create a dynamic library, so you'd know the ltoplugin is not supported on that
platform.

Of course, ideally we'd report it earlier, but I don't quite see how to
accomplish that.  Testing whether shared libraries remained enabled in
lto-plugin/configure is another viable option, but even that feels too late,
and it wouldn't catch all cases: libtoolo might configure itself to build
shared libraries, and decide that it can't do that for the specific case of
lto-plugin (say, on a platform that doesn't support shared libs with undefined
symbols, given that we don't pass -no-undefined, or for other reasons, such as
non-dynamic dependency libs on platforms that can't have non-PIC in shared
libs)

Will the former do?  Any other thoughts or wishes?

Reply via email to