[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] Don't use / when applying sed with CFLAGS
From:       Mike Frysinger <vapier () gentoo ! org>
Date:       2011-06-27 20:25:30
Message-ID: 201106271625.31330.vapier () gentoo ! org
[Download RAW message or body]


On Monday, June 27, 2011 15:56:24 justin wrote:
> On 6/27/11 9:26 PM, Mike Frysinger wrote:
> > On Monday, June 27, 2011 11:23:58 Lars Wendler wrote:
> >> Am Montag 27 Juni 2011, 17:01:01 schrieb Fabian Groffen:
> >>> On 27-06-2011 14:08:52 +0000, Justin Lecher wrote:
> >>>> Please do not use / as seperater when using sed with CFLAGS. I came
> >>>> across a bug today where it failed for crossdev. Here the toolchain
> >>>> header paths in the cflags and consowuently the seds fail.
> >>> 
> >>> Please also don't use ':' as separator, as some platforms have options
> >>> for their toolchain that includes colons.
> >> 
> >> Rather than telling us what to _not_ use as separator how about
> >> suggesting a list of konwn to be good separators for such cases. How
> >> about the @ character?
> > 
> > "|" tends to be safe for *FLAGS
> > 
> > this topic has come up before, so it's probably useful to read the
> > history in the archives rather than rehash the whole thing from scratch
> > every year or so. i thought we also had a section in the devmanual
> > covering this ...
> 
> I am not cross compiling so I never hit this issue nor was interested
> in. And not even thought about it, so the addressed audience are people
> like me.

it's not a cross-compiling issue.  anyone can use these chars in their flags.  
like the prefix weirdos doing native builds.

> Due to this bug I did a grep on the tree and there are really many
> package doing it wrong. So any section in the manuals or past
> discussions here didn't change a thing as it seems.

probably because it's such a minor issue and only crops up with people using 
uncommon values.  also, i'd suspect you have quite a bit of false positives as 
it isnt just a matter of "using / or : as the separator is always wrong".  and 
it only matters if the variables from users get expanded in the middle of the 
sed expression.  using 's:...:${CFLAGS}:' is not a problem.
-mike

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic