Gentoo Archives: gentoo-dev

From: Alexis Ballier <aballier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: Example autoconf code for enabling -Wl,--as-needed from upstream configure script
Date: Sat, 07 Aug 2010 14:59:09
Message-Id: 201008071758.46883.aballier@gentoo.org
In Reply to: [gentoo-dev] RFC: Example autoconf code for enabling -Wl,--as-needed from upstream configure script by Samuli Suominen
1 On Saturday 07 August 2010 17:45:02 Samuli Suominen wrote:
2 > Could use eyepair or two to doublecheck the example code in:
3 >
4 > [1] http://bugs.gentoo.org/attachment.cgi?id=241779
5 > [2] http://bugs.gentoo.org/show_bug.cgi?id=331527
6
7 You should use AC_TRY_LINK or something similar to check for toolchain
8 support. Hardcoding a given set of strings matching the version is generally
9 not a good way of writing a check; if you check something, check it for real.
10
11 Also if you pass -Wl,--as-needed to the compiler that's what you should check
12 rather than if the supposed linker supports --as-needed; I suppose AC_TRY_LINK
13 will do that.
14
15 A.

Replies