This is the mail archive of the gcc@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: fixincludes & sed question


On Wed, May 20, 2009 at 2:47 PM, Steve Ellcey <sje@cup.hp.com> wrote:
> I have a question about the use of sed by fixincl and mkheaders
> and a change that was made between 4.3.* and 4.4.0.

> After this patch, the sed used when building GCC is saved in a config
> file and that path to sed is used when you run mkheaders. ?This is
> a problem if mkheaders is run after the GCC build and the sed used
> is no longer available.
>
> I ran into this problem because when I build GCC I use a GNU sed
> that I have in my build environment along with GCC, bison, the
> auto* tools, etc. ?But then I package GCC up for users into a
> bundle which when installed will automatically run mkheaders on
> their system in order to make sure the GCC headers are in sync
> with their system headers which may or may not be identical to the
> ones on the system where I built GCC. ?They don't have my build
> environment available and so sed is not found and the mkheaders
> command fails.
>
> I am wondering if it is reasonable to require having the 'build sed'
> available anytime we want to run mkheaders?

Hi Steve,

The "mkheaders" command would need to know where to find a POSIX
sed command.  Unfortunately, the BSD command is not POSIX compatible
and is the default sed command for BSD.  The easiest solution is not
completely obvious.  Perhaps you can figure out a different POSIX
sed to use for the build process?  One that would be around?
Later on, someone can train "mkheaders" to accept a parameter or environment
variable to use, and further down the road perhaps we can get rid of
"sed" style fixes altogether.  Those won't happen today though.  Sorry.

 - Bruce


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