Subject: Re: Patches to make the tree cross-compilable
To: Wolfgang Solfrank <ws@tools.de>
From: Bill Studenmund <skippy@macro.stanford.edu>
List: tech-toolchain
Date: 02/17/1998 09:37:43
On Tue, 17 Feb 1998, Wolfgang Solfrank wrote:

> > +mksyntax: mksyntax.c
> > +       ${HOST_CC} -o mksyntax ${.CURDIR}/mksyntax.c
> > +
> 
> This doesn't work in all cases.
> 
> In particular, mksyntax is used to generate some include files and tables
> that are used in the parsing process.  The characteristics of the tables
> depend on the machine that is used to compile mksyntax (obviously), but
> they are intended to eliminate some hardware/compiler dependency for the
> machine they are used on, i.e. the machine where /bin/sh is run.  They depend
> on whether the machine in use has signed or unsigned characters, and on the
> number of bits in a character.
> 
> It should be obvious that this wouldn't work if the characteristics of the
> machine used for compiling and the machine used to run the compiled /bin/sh
> differ in this respect.
> 
> Yes, this _is_ considered a bug in the /bin/sh source (and I intend to fix
> it when I get some spare time again (and noone beats me to it)).

Hmmm. I'm not sure what to do. Which architectures are on which side of
the fence with this?

Also, what's the fix? The only ones which comes to mind would be to either
use yacc or to have cpp chew on some of the files, generating a file in
the sh working directory which mksyntax then reads.

Take care,

Bill