PATCH: LDFLAGS handling in V3
Mark Mitchell
mark@codesourcery.com
Wed Jul 27 22:13:00 GMT 2005
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
More information about the Gcc-patches
mailing list