FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 08-07-2010, 03:19 PM
Samuli Suominen
 
Default RFC: Example autoconf code for enabling -Wl,--as-needed from upstream configure script

On 08/07/2010 05:58 PM, Alexis Ballier wrote:
> On Saturday 07 August 2010 17:45:02 Samuli Suominen wrote:
>> Could use eyepair or two to doublecheck the example code in:
>>
>> [1] http://bugs.gentoo.org/attachment.cgi?id=241779
>> [2] http://bugs.gentoo.org/show_bug.cgi?id=331527
>
> You should use AC_TRY_LINK or something similar to check for toolchain
> support. Hardcoding a given set of strings matching the version is generally
> not a good way of writing a check; if you check something, check it for real.
>
> Also if you pass -Wl,--as-needed to the compiler that's what you should check
> rather than if the supposed linker supports --as-needed; I suppose AC_TRY_LINK
> will do that.

I tend to agree but have one concern:

What if some non-GNU ld's are accepting the syntax of -Wl,--as-needed
but is in fact doing something entirely different?

I just remember one of our prefix devs, not long ago, saying that
happens. I think it was on this ML on different thread but sorry, can't
find the post now...

Note that flag-o-matic.eclass's check in function no-as-needed() is
checking for GNU as well.
 
Old 08-07-2010, 03:25 PM
Alexis Ballier
 
Default RFC: Example autoconf code for enabling -Wl,--as-needed from upstream configure script

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

you can check for both if you prefer, the main problem I see in the original
check is that its not checking at all if as-needed works and appends a flag to
gcc while it checks only if ld accepts the flag

A.
 
Old 08-07-2010, 10:07 PM
Mike Frysinger
 
Default RFC: Example autoconf code for enabling -Wl,--as-needed from upstream configure script

On Saturday, August 07, 2010 10:45:02 Samuli Suominen wrote:
> Could use eyepair or two to doublecheck the example code in:

how about you let someone else deal with it:
http://www.gnu.org/software/autoconf-archive/ax_check_linker_flags.html
-mike
 
Old 08-09-2010, 09:47 PM
Samuli Suominen
 
Default RFC: Example autoconf code for enabling -Wl,--as-needed from upstream configure script

On 08/08/2010 01:07 AM, Mike Frysinger wrote:
> On Saturday, August 07, 2010 10:45:02 Samuli Suominen wrote:
>> Could use eyepair or two to doublecheck the example code in:
>
> how about you let someone else deal with it:
> http://www.gnu.org/software/autoconf-archive/ax_check_linker_flags.html
> -mike

thanks, didn't know about that macro. will make use of it in the bug.
 

Thread Tools




All times are GMT. The time now is 03:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org