Subject: mksyntax (Was: weird lossage with xcompile macppc -> sparc)
To: None <tech-toolchain@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: tech-toolchain
Date: 10/31/2002 14:12:32
I've just been bitten by this problem that Matthew Green reproted on
September 21 (I was x-building macppc->hpcsh).  

So the problem is that bin/sh/Makefile defines:

.if	(${MACHINE_ARCH} == "powerpc") || \
	(${MACHINE_CPU} == "arm")
TARGET_CHARFLAG= -DTARGET_CHAR="unsigned char"
.else
TARGET_CHARFLAG= -DTARGET_CHAR="char"
.endif

So when mksyntax is run on an arm or ppc host, it gets compiled with
TARGET_CHAR set to *host* own, unsgined, "char".  Using "signed char"
for .else branch fixes this.

I wonder if we care about host compilers that don't support "signed"?

PS: Please, Cc me on your replies.  I'm not subscribed to
tech-toolchain.

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen