]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: Simplify mksyntax and make it fit for cross-compiling.
authorjilles <jilles@FreeBSD.org>
Thu, 7 Feb 2013 22:42:33 +0000 (22:42 +0000)
committerjilles <jilles@FreeBSD.org>
Thu, 7 Feb 2013 22:42:33 +0000 (22:42 +0000)
commit89d287b04017254988cbc3d9d57a802dc0ba92b3
tree5a5e6c5611612d1d16e68b4099df1194be9dba78
parent541d8676f1dbb712a3ab3c8978cb198a56fac1dc
sh: Simplify mksyntax and make it fit for cross-compiling.

Now it outputs fixed files, which use constants provided by the C standard
library to determine appropriate values for the target machine.

Before, mksyntax inspected the host machine which resulted in subtle
breakage if e.g. char is signed on the host and unsigned on the target such
as when cross-compiling on x86 for ARM.

Tested using -funsigned-char on amd64. Compiling build-tools without it and
sh itself with it causes various tests to fail without this change but not
with this change. With consistent -funsigned-char, tests pass with or
without this change.

The mksyntax program could be removed and syntax.c and syntax.h committed to
the repository.

Submitted by: Christoph Mallon
MFC after: 2 weeks
bin/sh/mksyntax.c