This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Allow build to specify what sed mkheaders uses


On Wed, 2009-08-26 at 10:12 +0200, Paolo Bonzini wrote:

> Does it work to just use ./configure SED=/bin/sed ?
> 
> Paolo

No, using SED=/usr/bin/sed doesn't work because the configure script
checks /usr/bin/sed, finds it lacking, and goes on to find the sed in my
BE and uses that.



On Wed, 2009-08-26 at 07:54 -0700, Bruce Korb wrote:
Hi Steve,
> 
> fixincludes needs a POSIX sed.  BSD's misbehaves.
> So any such change will require testing on multple
> platforms.  Minimally, I think:
> 
> BSD
> Linux
> Solaris
> OS/X
> HP/UX if you like, too. ;)

If the user (the person building GCC) does not specify
--with-fixincludes-sed, then there is no change in the current
behaviour, so I don't think this extensive testing is needed.



On Wed, 2009-08-26 at 11:54 -0400, NightStrike wrote:

> Does autoconf take care of this wiht AC_PROG_SED ?  Then you just use
> $(SED) to do your work.

The AC_PROG_SED macro does not seem to include the functionality that I
want.  If you specify SED (like Paolo suggested) it will check that sed
command first (I think) but if it doesn't like it then it will check for
other sed's in your path and use one of those.



On Wed, 2009-08-26 at 15:53 +0000, Joseph S. Myers wrote:

> I think such a change clearly is needed for when you build tools, on a 
> system with GNU sed in the PATH, that are intended to be used on multiple 
> systems some of which may not have GNU sed in the PATH (and moving tools 
> from one system to another is a key use of having mkheaders installed).
> 
> It might abstractly be better to convert all the "sed" fixes to a built-in 
> form so fixincludes never needs "sed" at all, but certainly this patch is 
> much simpler.

This is exactly the situation I am in.  The HP-UX sed may not meet the full
criteria for a posix compliant sed but it has always worked fine for me when
using it in mkheaders and I don't want to have to package a sed command in
with GCC in order to allow users to run mkheaders.

Steve Ellcey
sje@cup.hp.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]