Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Don't use / when applying sed with CFLAGS
Date: Mon, 27 Jun 2011 20:26:38
Message-Id: 201106271625.31330.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] Don't use / when applying sed with CFLAGS by justin
1 On Monday, June 27, 2011 15:56:24 justin wrote:
2 > On 6/27/11 9:26 PM, Mike Frysinger wrote:
3 > > On Monday, June 27, 2011 11:23:58 Lars Wendler wrote:
4 > >> Am Montag 27 Juni 2011, 17:01:01 schrieb Fabian Groffen:
5 > >>> On 27-06-2011 14:08:52 +0000, Justin Lecher wrote:
6 > >>>> Please do not use / as seperater when using sed with CFLAGS. I came
7 > >>>> across a bug today where it failed for crossdev. Here the toolchain
8 > >>>> header paths in the cflags and consowuently the seds fail.
9 > >>>
10 > >>> Please also don't use ':' as separator, as some platforms have options
11 > >>> for their toolchain that includes colons.
12 > >>
13 > >> Rather than telling us what to _not_ use as separator how about
14 > >> suggesting a list of konwn to be good separators for such cases. How
15 > >> about the @ character?
16 > >
17 > > "|" tends to be safe for *FLAGS
18 > >
19 > > this topic has come up before, so it's probably useful to read the
20 > > history in the archives rather than rehash the whole thing from scratch
21 > > every year or so. i thought we also had a section in the devmanual
22 > > covering this ...
23 >
24 > I am not cross compiling so I never hit this issue nor was interested
25 > in. And not even thought about it, so the addressed audience are people
26 > like me.
27
28 it's not a cross-compiling issue. anyone can use these chars in their flags.
29 like the prefix weirdos doing native builds.
30
31 > Due to this bug I did a grep on the tree and there are really many
32 > package doing it wrong. So any section in the manuals or past
33 > discussions here didn't change a thing as it seems.
34
35 probably because it's such a minor issue and only crops up with people using
36 uncommon values. also, i'd suspect you have quite a bit of false positives as
37 it isnt just a matter of "using / or : as the separator is always wrong". and
38 it only matters if the variables from users get expanded in the middle of the
39 sed expression. using 's:...:${CFLAGS}:' is not a problem.
40 -mike

Attachments

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