Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Proposal for flag-o-matic.eclass (append-ldflags)
Date: Fri, 28 Aug 2009 14:55:52
Message-Id: 200908281604.55789.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] Proposal for flag-o-matic.eclass (append-ldflags) by Donnie Berkholz
1 On Tuesday 09 December 2008 14:14:05 Donnie Berkholz wrote:
2 > On 10:33 Mon 08 Dec , Jeremy Olexa wrote:
3 > > Hello,
4 > > I am seeking a positive code review on the following change to
5 > > flag-o-matic.eclass, diff is below (reasons are below that):
6 > >
7 > > %% cvs diff
8 > > Index: flag-o-matic.eclass
9 > > RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
10 > > retrieving revision 1.126
11 > > diff -u -r1.126 flag-o-matic.eclass
12 > > --- flag-o-matic.eclass 3 Nov 2008 05:52:39 -0000 1.126
13 > > +++ flag-o-matic.eclass 25 Nov 2008 18:36:04 -0000
14 > > @@ -417,7 +417,8 @@
15 > >
16 > > x=""
17 > > for x in "$@" ; do
18 > > - test-flag-${comp} "${x}" && flags="${flags}${flags:+
19 > > }${x}" + test-flag-${comp} "${x}" &&
20 > > flags="${flags}${flags:+ }${x}" || \ + ewarn
21 > > "removing ${x} because ${comp} rejected it" done
22 > >
23 > > echo "${flags}"
24 > > @@ -656,7 +657,7 @@
25 > > ewarn "Appending a library link instruction
26 > > (${flag}); libraries to link to should not be passed through LDFLAGS"
27 > > done
28 > >
29 > > - export LDFLAGS="${LDFLAGS} $*"
30 > > + export LDFLAGS="${LDFLAGS} $(test-flags "$@")"
31 > > return 0
32 > > }
33 >
34 > I like the consistency with other flags:
35 >
36 > comet $ grep FLAGS.*test-fl /usr/portage/eclass/flag-o-matic.eclass
37 > export CFLAGS=$(test-flags-CC ${CFLAGS})
38 > export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS})
39 > export FFLAGS=$(test-flags-F77 ${FFLAGS})
40 > export FCFLAGS=$(test-flags-FC ${FCFLAGS})
41
42 your grep ignores the bigger picture. this is only in the strip-unsupported-
43 flag function. so while we should flesh it out to include CPPFLAGS/LDFLAGS,
44 it doesnt really address the original question.
45 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature