[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About the use of ${wl} ...
From: |
Ralf Wildenhues |
Subject: |
Re: About the use of ${wl} ... |
Date: |
Mon, 31 Oct 2005 17:33:44 +0100 |
User-agent: |
Mutt/1.5.11 |
* Kean Johnston wrote on Mon, Oct 31, 2005 at 05:00:40PM CET:
>
> If you find youself having to make changes to things that
> use ${wl}, consider consolidating the arguments. It makes some
> long lines a bit shorter, and can read better. -Wl takes any
> number of comma-separated arguments and expands them out
> correctly when invoking the link editor. So instead of:
>
> some_variable="${wl}-h ${wl}$soname"
>
> you can use:
>
> some_variable="${wl}-h,$soname"
Are you speaking of arguments given to `libtool' or given to `$CC'?
If the latter: AFAIK not every compiler allows aggregation of arguments
after its variant of $wl. `libtool' OTOH copes fine with
./libtool --mode=link gcc -Wl,-foo,-bar,-baz ...
> Although there are no cases I have seen thus far that would be
> affected, this is also a bit safer, as it guarantees that the
> correct arguments travel with the correct options. At least at
> one point in its lifetime, libtool would rewrite command lines
> and if you happen to split along the incorrect boundary you
> could land in a world of trouble.
Ok, so you are speaking about `libtool'. Well, please report any
cases where you see this.
OTOH, some compiler drivers reorder as well. Last bug report entered
bug-libtool a few hours ago.
> Like I said, its just cosmetic, but then my brain was compiled
> with -pedantic :)
Pedantic is necessary for libtool, if you want to keep it from breaking.
Cheers,
Ralf