> In as.scm anything is integer only, there is no floating point support at
> all in Mes.  Any float/double value will become an #:immediate which gets
> converted with dec->hex and so any fraction is dropped.  Well, my guess is
> that some TCC code with float/double will be truncated to integer
> arithmetic without fractions.  That’s for sure buggy, but that part does
> not seem to harm TCC when building itself.  Lucky me! :-)

So, I just tried adding -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 to the current 
build process of tcc-mes (that is built with mescc) and got  the following

 +> /usr/bin/mes-m2 --no-auto-compile -e main /usr/bin/mescc.scm -- --base-
address 0x08048000 -o tcc-mes -L /usr/lib/mes tcc.s -l c+tcc 
 +> cp tcc-mes /usr/bin/ 
 +> chmod 755 /usr/bin/tcc-mes 
 +> tcc-mes -version 
tcc version 0.9.26 (i386 Linux)
 +> cd ../mes-0.27.1 
 +> cd lib 
 +> catm ../unified-libc.c <REDACTED>
 +> cd .. 
 +> tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/
mes/crt1.o lib/linux/x86-mes-gcc/crt1.c 
 +> catm /usr/lib/mes/crtn.o 
 +> catm /usr/lib/mes/crti.o 
 +> if match x86 x86 
 +> then 
+> tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/
mes/crtn.o lib/linux/x86-mes-gcc/crtn.c 
 +> tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/
mes/crti.o lib/linux/x86-mes-gcc/crti.c 
 +> fi 
 +> tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-
libc.o unified-libc.c 
unified-libc.c:2425: warning: SYS_exit redefined
unified-libc.c:2643: warning: SYS_write redefined
 +> tcc-mes -ar cr /usr/lib/mes/libc.a unified-libc.o 
 +> mkdir /usr/lib/mes/tcc 
 +> tcc-mes -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I 
include -I include/linux/x86 -o libtcc1.o lib/libtcc1.c 
lib/libtcc1.c:227: error: can't cross compile long double constants

So tcc-mes binary was able to build quite a lot before lib/libtcc1.c file 
(which is from the mes tree).

Andrius



Reply via email to