Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Alex Merry
On Sat, Jul 15, 2006 at 05:51:22PM -0400, Joe Ciccone wrote: > Alex Merry wrote: > > Robert was suggesting a change that would allow the sed to be applied to > > other *FLAGS variables. When you consider the dangers in constructing and > > running commands you don't fully understand in the compilat

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Joe Ciccone
Alex Merry wrote: > > But surely the only way anyone would have anything on that line is if > they'd already been doing something different to the book, in which case > (especially with the toolchain) they should be acutely aware of what the > instructions do and the possible implications of any ch

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Alex Merry
On Sat, Jul 15, 2006 at 05:13:53PM -0400, Joe Ciccone wrote: > Bruce Dubbs wrote: > > Robert Connolly wrote: > > > >> This isn't a bug, but the line: > >> > >> sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' > >> > >> can be problematic if a user uses this command to modify other variables, > >> be

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Joe Ciccone
Bruce Dubbs wrote: > Robert Connolly wrote: > >> This isn't a bug, but the line: >> >> sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' >> >> can be problematic if a user uses this command to modify other variables, >> because the -fomit-frame-pointer is appended to the end of the line. Some of >>

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Randy McMurchy
Alex Merry wrote these words on 07/15/06 12:59 CST: > It will not for example, match > XCFLAGS = -g -O2 > The reason is obvious: there is no end-of-line after the =, which is > what $ matches. Exactly what I've been trying to get across to Robert, but every time I've provided an example 'sed' to

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Alex Merry
On Sat, Jul 15, 2006 at 12:40:54PM -0400, Robert Connolly wrote: > On July 15, 2006 12:26 pm, Randy McMurchy wrote: > > Robert Connolly wrote these words on 07/15/06 11:13 CST: > > [EMAIL PROTECTED]: ~/build > sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' tf > > stuff > > XCFLAGS = -g -O2 > > more st

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Robert Connolly
On July 15, 2006 12:26 pm, Randy McMurchy wrote: > Robert Connolly wrote these words on 07/15/06 11:13 CST: > > Both '^XCFLAGS =$' and '^XCFLAGS =' match this. > > Okay then, explain this: > > [EMAIL PROTECTED]: ~/build > cat tf > stuff > XCFLAGS = -g -O2 > more stuff > > [EMAIL PROTECTED]: ~/build

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Randy McMurchy
Robert Connolly wrote these words on 07/15/06 11:13 CST: > Both '^XCFLAGS =$' and '^XCFLAGS =' match this. Okay then, explain this: [EMAIL PROTECTED]: ~/build > cat tf stuff XCFLAGS = -g -O2 more stuff [EMAIL PROTECTED]: ~/build > sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' tf stuff XCFLAGS = -

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Robert Connolly
On July 15, 2006 10:29 am, Randy McMurchy wrote: > Robert Connolly wrote these words on 07/15/06 09:14 CST: > > XCFLAGS = -g -O2 > > > > sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' will change it into: > > > > XCFLAGS = -g -O2 -fomit-frame-pointer > > Not on my systems. That sed will not match the

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Randy McMurchy
Robert Connolly wrote these words on 07/15/06 09:14 CST: > XCFLAGS = -g -O2 > > sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' will change it into: > > XCFLAGS = -g -O2 -fomit-frame-pointer Not on my systems. That sed will not match the line! '^XCFLAGS =$' does not equal 'XCFLAGS = -g -O2' Those

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Robert Connolly
On July 15, 2006 09:55 am, Randy McMurchy wrote: > Bruce Dubbs wrote these words on 07/15/06 08:44 CST: > > Robert Connolly wrote: > >> sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' > >> > >> sed 's/^XCFLAGS =/& -fomit-frame-pointer/' > > > > I'd be interested in other opinions. > I fail to see what

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Randy McMurchy
Bruce Dubbs wrote these words on 07/15/06 08:44 CST: > Robert Connolly wrote: >> >> sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' >> >> sed 's/^XCFLAGS =/& -fomit-frame-pointer/' > > I'd be interested in other opinions. I fail to see what Robert's sed does. To me, it either: 1) does exactly the sa

Re: fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Bruce Dubbs
Robert Connolly wrote: > This isn't a bug, but the line: > > sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' > > can be problematic if a user uses this command to modify other variables, > because the -fomit-frame-pointer is appended to the end of the line. Some of > the *FLAGS in GCC end with a \

fomit-frame-pointer sed in gcc pass2/3

2006-07-15 Thread Robert Connolly
This isn't a bug, but the line: sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' can be problematic if a user uses this command to modify other variables, because the -fomit-frame-pointer is appended to the end of the line. Some of the *FLAGS in GCC end with a \ character at the end of the first lin