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:

> 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


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