Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
Date: Sun, 04 Oct 2009 10:00:55
Message-Id: E1MuNtd-0005yB-C8@stork.gentoo.org
1 ssuominen 09/10/04 10:00:53
2
3 Modified: flag-o-matic.eclass
4 Log:
5 New function: no-as-needed which returns the value to disable asneeded, for GNU ld only at this time.
6
7 Revision Changes Path
8 1.145 eclass/flag-o-matic.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.145&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.145&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.144&r2=1.145
13
14 Index: flag-o-matic.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
17 retrieving revision 1.144
18 retrieving revision 1.145
19 diff -u -r1.144 -r1.145
20 --- flag-o-matic.eclass 16 Aug 2009 00:16:12 -0000 1.144
21 +++ flag-o-matic.eclass 4 Oct 2009 10:00:53 -0000 1.145
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2009 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.144 2009/08/16 00:16:12 vapier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.145 2009/10/04 10:00:53 ssuominen Exp $
27
28 # @ECLASS: flag-o-matic.eclass
29 # @MAINTAINER:
30 @@ -719,6 +719,14 @@
31 die "Stop using bindnow-flags."
32 }
33
34 +# @FUNCTION: no-as-needed
35 +# @RETURN: Flag to disable asneeded behavior for use with append-ldflags.
36 +no-as-needed() {
37 + case $($(tc-getLD) -v 2>&1 </dev/null) in
38 + *GNU*) # GNU ld
39 + echo "-Wl,--no-as-needed" ;;
40 + esac
41 +}
42
43 # Some tests for when we screw with things and want to make
44 # sure we didn't break anything