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


On Oct  7, 2005, Mark Mitchell <mark@codesourcery.com> wrote:

> Alexandre Oliva wrote:

>> One thing that got me a bit confused is that you're quoting every
>> single argument with -Xcompiler here.  Is this really what you mean?
>> This will render libtool unable to recognize some arguments that it is
>> supposed to handle itself; -Ldir, -lib, -static, -all-static, -rpath
>> dir and -Rdir come to mind.  -rpath is probably the most difficult to
>> handle correctly, because you must not only leave itself alone, but
>> also the subsequent argument.

> I'm not sure.

> Does libtool prefix those with "-Wl," by default?

No, but that doesn't matter.  What I'm talking about is that, if you
prefix them with -Xcompiler, then *libtool* will not see them.  E.g.,
-all-static is a libtool-only flag, and if libtool doesn't see it
because you prefix it with -Xcompiler, you'll get an error from the
compiler driver.  -static has slightly-different meanings too.  Ditto
for -rpath, that is equivalent to -R for the linker, not necessarily
so for the compiler driver and definitely different for libtool.
The ones I mentioned above must not get the -Xcompiler prefix at all,
so that libtool can see them and operate on them.

> But, I'm not really sure what people do with LDFLAGS; all I know is
> that I want to pass "--sysroot" there.

Perhaps use -fsysroot instead, and arrange for your script to prefix
only -f* flags with -Xcompiler, as opposed to handling everything
except what you know to be special for libtool?  Or maybe extend to
--* as well, since libtool doesn't handle double-dash arguments?

> Do you want me to try to skip the -Xcompiler for the options you list?

Definitely.  Not doing so would certainly break things.

Thanks,

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


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