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 compilations of > > toolchain packages, it seems to me that it would be sensible to actively > > discourage such an activity. > > > No, His suggested sed would still only affect that one line. I'll even > copy it from his origional email so you can look at it again. > > sed 's/^XCFLAGS =/& -fomit-frame-pointer/'
Sorry, I wasn't very clear about what I said. The point I was trying to make was not that his change would affect other *FLAGS, but that the _rationale_ for his change was that it would make it easier to adapt to other *FLAGS variables. > > In fact, I believe Robert misunderstood the sed, thinking it was > > something like 's/^XCFLAGS =.*$/& -fomit-frame-pointer/'. If they tried > > to adapt, say, XFOOFLAGS using this method and XFOOFLAGS looked like: > > XFOOFLAGS = -blah -foo \ > > -bar > > then the sed 's/^XFOOFLAGS =$/& -baz/' would do precisely nothing. So > > users trying this method who don't know what they're doing end up doing > > nothing rather than screwing up their compilation. > > > Let's quote something from the lfs book. In section 1.5.1 there is a > note that states exactly the following, " Deviating from this book does > /not/ mean that we will not help you. After all, LFS is about personal > preference. Being upfront about any changes to the established procedure > helps us evaluate and determine possible causes of your problem." > > There is no reason for this sed to have the $ in it. I may apply a patch > to gcc that adds a value to that line. This is deviation from the book, > but in fact, the sed with the $ in it will render the command useless if > I update this line myself. Why make it hard for people who want to > deviate from the book when in section 1.5.1 it says that lfs is about > personal preference. Maybe my personal preference is to add something to > the XCFLAGS line before I run the sed but, I overlook what the sed does. > It just simply doesn't make sense to me to change the command to benefit > others without sacrificing anything! Fair enough. I wasn't convinced by Robert's reasoning, partly as it seemed to be based on a misreading of the original sed command and partly because the idea of adapting sed commands you don't understand makes me very wary (been there, done that, shredded the T-shirt), but this seems like a perfectly good reason to change the sed, assuming there are no other lines in gcc/Makefile.in that start with "XCFLAGS =". Alex :-) -- Pippin Computer Monkey to the Pelican www.oxrev.org.uk, www.corpusjcr.org, www.rev.org.uk
pgpAZMTfuXlPN.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
