1 |
On 08/07/2010 05:58 PM, Alexis Ballier wrote: |
2 |
> On Saturday 07 August 2010 17:45:02 Samuli Suominen wrote: |
3 |
>> Could use eyepair or two to doublecheck the example code in: |
4 |
>> |
5 |
>> [1] http://bugs.gentoo.org/attachment.cgi?id=241779 |
6 |
>> [2] http://bugs.gentoo.org/show_bug.cgi?id=331527 |
7 |
> |
8 |
> You should use AC_TRY_LINK or something similar to check for toolchain |
9 |
> support. Hardcoding a given set of strings matching the version is generally |
10 |
> not a good way of writing a check; if you check something, check it for real. |
11 |
> |
12 |
> Also if you pass -Wl,--as-needed to the compiler that's what you should check |
13 |
> rather than if the supposed linker supports --as-needed; I suppose AC_TRY_LINK |
14 |
> will do that. |
15 |
|
16 |
I tend to agree but have one concern: |
17 |
|
18 |
What if some non-GNU ld's are accepting the syntax of -Wl,--as-needed |
19 |
but is in fact doing something entirely different? |
20 |
|
21 |
I just remember one of our prefix devs, not long ago, saying that |
22 |
happens. I think it was on this ML on different thread but sorry, can't |
23 |
find the post now... |
24 |
|
25 |
Note that flag-o-matic.eclass's check in function no-as-needed() is |
26 |
checking for GNU as well. |