This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: PATCH: LDFLAGS handling in V3
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 06 Oct 2005 23:23:46 -0700
- Subject: Re: PATCH: LDFLAGS handling in V3
- References: <200507272135.j6RLZHH2024117@sethra.codesourcery.com> <or8xzrgaze.fsf@livre.redhat.lsd.ic.unicamp.br> <42E806F0.4050704@codesourcery.com> <42E81D58.5000108@codesourcery.com> <or64uuai3x.fsf@livre.redhat.lsd.ic.unicamp.br> <42E927F8.2090004@codesourcery.com> <orpst29142.fsf@livre.redhat.lsd.ic.unicamp.br> <42E98339.2070803@codesourcery.com> <42E9AD58.5020809@codesourcery.com> <orbr25qcci.fsf@livre.oliva.athome.lsd.ic.unicamp.br>
Alexandre Oliva wrote:
> Apologies for the huge delay.
No problem, thanks for the reply.
> sed_script="1s,^X,,;s|'|'\"'\"'|g"
> case $arg in
> *"'"*) quoted_arg=`echo "X$arg" | sed -e "$sed_script"` ;;
> *) quoted_arg=$arg ;;
> esac
> quoted_arg="'"$quoted_arg"'"
Thanks; I'll experiment with that.
> 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? The compiler driver
does need to know about some of those (at least -static) so it would be
wrong to prefix them with "-Wl,". Since the semantics of LDFLAGS are
that (despite the name) the arguments are expected to be passed to the
compiler driver, rather than directly to "ld", it seems sensible to add
-Xcompiler. But, I'm not really sure what people do with LDFLAGS; all I
know is that I want to pass "--sysroot" there.
Do you want me to try to skip the -Xcompiler for the options you list?
I can try...
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304