Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] demanual update (was: Don't use / when applying sed with CFLAGS)
Date: Tue, 28 Jun 2011 16:26:59
Message-Id: 201106281223.51898.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] demanual update (was: Don't use / when applying sed with CFLAGS) by "Michał Górny"
1 On Tuesday, June 28, 2011 02:54:03 Michał Górny wrote:
2 > On Tue, 28 Jun 2011 10:16:06 +0400 Peter Volkov wrote:
3 > > But still our documentation explicitly suggests ':' for CFLAGS cases
4 > > and example allows bash substitution.
5 > >
6 > > http://devmanual.gentoo.org/ebuild-writing/functions/src_compile/building
7 > > /index.html see example in "Fixing Compiler Usage" section and text
8 > > below:
9 > > sed -i -e "s:cc -O2:$(tc-getCC) ${CFLAGS} ${LDFLAGS}:" build.sh
10 > >
11 > > Are there any objections to suggest '|' for CFLAGS, LDFLAGS (see
12 > > attachment)?
13 >
14 > I think that also a good idea may be to provide an Makefile example,
15 > showing that often sed is unnecessary, and it's enough to do things
16 > like:
17 >
18 > emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"...
19
20 this is easily dangerous when it comes to packages (and many do) that append
21 in the Makefile. specifying on the command line blocks those while passing
22 via env works fine. i'm not sure it's appropriate to provide as an example.
23 -mike

Attachments

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

Replies