This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: LDFLAGS handling in V3


Alexandre Oliva wrote:

+ # The LDFLAGS we receive from the top-level Makefile are designed directly + # for the linker, so we must tell libtool to pass them along explicitly.
+ LIBTOOLLDFLAGS = `for ldflag in $(LDFLAGS); do echo "-Wl,$$ldflag"; done`

It would have to be more complex than this, to preserve quoting of flags and avoid mangling of comma-containing ldflags (-Xlinker/-XCClinker are safer in this regard). I'd really prefer to defer such transformation to the user, given how tricky it is, or implement it as a separate, reusable script, that takes care of all issues, and that can even attempt to be clever and recognize some GCC-specific flags, choosing the right -X*linker flag.

If all target libraries are assumed to be built with libtool, then we can indeed defer to the user. If not, then we have to do something; the user has no way to control the fact that some target libraries need libtoolification of their options, while others do not.


I do understand what you mean about quoting and about reusable scripts. I suppose I could work on that, once we know what we want it to do.

Thanks,

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]