FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 06-27-2011, 03:01 PM
Fabian Groffen
 
Default Don't use / when applying sed with CFLAGS

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.


--
Fabian Groffen
Gentoo on a different level
 
Old 06-27-2011, 03:23 PM
Lars Wendler
 
Default Don't use / when applying sed with CFLAGS

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?

--
Lars Wendler (Polynomial-C)
Gentoo package maintainer and bug-wrangler
 
Old 06-27-2011, 03:37 PM
Donnie Berkholz
 
Default Don't use / when applying sed with CFLAGS

On 17:23 Mon 27 Jun , 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?

One of my favorites for weird cases is ~.

--
Thanks,
Donnie

Donnie Berkholz
Sr. Developer, Gentoo Linux
Blog: http://dberkholz.com
 
Old 06-27-2011, 03:44 PM
Jeroen Roovers
 
Default Don't use / when applying sed with CFLAGS

On Mon, 27 Jun 2011 17:01:01 +0200
Fabian Groffen <grobian@gentoo.org> wrote:

> 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.

Then don't do it at all or we could be here til Christmas. That is, do
not inject CFLAGS/LDFLAGS/CC/... into any file, but use the file's
native variable format so that it picks up the information from the
environment.


jer
 
Old 06-27-2011, 07:26 PM
Mike Frysinger
 
Default Don't use / when applying sed with CFLAGS

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 ...
-mike
 
Old 06-27-2011, 07:56 PM
justin
 
Default Don't use / when applying sed with CFLAGS

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 ...
> -mike

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.
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.

justin
 
Old 06-27-2011, 08:25 PM
Mike Frysinger
 
Default Don't use / when applying sed with CFLAGS

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
 

Thread Tools




All times are GMT. The time now is 10:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org