Le mercredi 23 janvier 2013 22:20:19, vous avez écrit : > Ok, hoping I did this correctly. I'm not very familiar with git, we use > svn. > > git clone git://repo.or.cz/tinycc.git $HOME/build/tinycc > cd build/tinycc > git checkout bfb00494eb2ffaf4fbf68a8ecabe9e503f4cdf65 > ./configure --with-libgccroot@beaglebone:~/build/tinycc# ./configure > --with-libgcc > > Binary directory /usr/local/bin > TinyCC directory /usr/local/lib/tcc > Library directory /usr/local/lib > Include directory /usr/local/include > Manual directory /usr/local/share/man > Info directory /usr/local/share/info > Doc directory /usr/local/share/doc/tcc > Target root prefix > Source path /home/root/build/tinycc > C compiler gcc > Target OS Linux > CPU armv4l > Big Endian no > gprof enabled no > cross compilers no > use libgcc yes > Creating config.mak and config.h > config.h is unchanged > root@beaglebone:~/build/tinycc# > > make clean > make > > root@beaglebone:~/build/tinycc# make > gcc -o tcc.o -c tcc.c -DTCC_TARGET_ARM -DWITHOUT_LIBTCC -DTCC_ARM_EABI > -DTCC_ARM_VFP -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign > -Wno-sign-compare -D_FORTIFY_SOURCE=0 > gcc -o libtcc.o -c libtcc.c -DTCC_TARGET_ARM -DWITHOUT_LIBTCC > -DTCC_ARM_EABI -DTCC_ARM_VFP -Wall -g -O2 -fno-strict-aliasing > -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 > gcc -o tccpp.o -c tccpp.c -DTCC_TARGET_ARM -DWITHOUT_LIBTCC -DTCC_ARM_EABI > -DTCC_ARM_VFP -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign > -Wno-sign-compare -D_FORTIFY_SOURCE=0 > gcc -o tccgen.o -c tccgen.c -DTCC_TARGET_ARM -DWITHOUT_LIBTCC > -DTCC_ARM_EABI -DTCC_ARM_VFP -Wall -g -O2 -fno-strict-aliasing > -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 > gcc -o tccelf.o -c tccelf.c -DTCC_TARGET_ARM -DWITHOUT_LIBTCC > -DTCC_ARM_EABI -DTCC_ARM_VFP -Wall -g -O2 -fno-strict-aliasing > -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 > tccelf.c:1190:12: warning: 'tcc_add_support' defined but not used > gcc -o tccasm.o -c tccasm.c -DTCC_TARGET_ARM -DWITHOUT_LIBTCC > -DTCC_ARM_EABI -DTCC_ARM_VFP -Wall -g -O2 -fno-strict-aliasing > -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 > gcc -o tccrun.o -c tccrun.c -DTCC_TARGET_ARM -DWITHOUT_LIBTCC > -DTCC_ARM_EABI -DTCC_ARM_VFP -Wall -g -O2 -fno-strict-aliasing > -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 > gcc -o arm-gen.o -c arm-gen.c -DTCC_TARGET_ARM -DWITHOUT_LIBTCC > -DTCC_ARM_EABI -DTCC_ARM_VFP -Wall -g -O2 -fno-strict-aliasing > -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 > ar rcs libtcc.a libtcc.o tccpp.o tccgen.o tccelf.o tccasm.o tccrun.o > arm-gen.o > gcc -o tcc tcc.o libtcc.a -lm -ldl -Wall -g -O2 -fno-strict-aliasing > -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 > texi2html -monolithic -number tcc-doc.texi > make: texi2html: Command not found > make: [tcc-doc.html] Error 127 (ignored) > makeinfo tcc-doc.texi > make: makeinfo: Command not found > make: [tcc-doc.info] Error 127 (ignored) > root@beaglebone:~/build/tinycc# > > make test > > root@beaglebone:~/build/tinycc# make test > make -C tests test > make[1]: Entering directory `/home/root/build/tinycc/tests' > gcc -o libtcc_test libtcc_test.c ../libtcc.a -I.. -Wall -g -O2 > -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare > -D_FORTIFY_SOURCE=0 -lm -ldl > ------------ libtest ------------ > ./libtcc_test lib_path=.. > Hello World! > fib(32) = 2178309 > add(32, 64) = 96 > cp ../include/tcclib.h . > gcc -o tcctest.gcc tcctest.c -I. -w -Wall -g -O2 -fno-strict-aliasing > -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -std=gnu99 > ./tcctest.gcc > test.ref > ------------ test3 ------------ > ../tcc -B.. -DTCC_TARGET_ARM -DWITHOUT_LIBTCC -DTCC_ARM_EABI -DTCC_ARM_VFP > -run -DONE_SOURCE ../tcc.c -B.. -DTCC_TARGET_ARM -DWITHOUT_LIBTCC > -DTCC_ARM_EABI -DTCC_ARM_VFP -run -DONE_SOURCE ../tcc.c -B.. > -DTCC_TARGET_ARM -DWITHOUT_LIBTCC -DTCC_ARM_EABI -DTCC_ARM_VFP -run > -DONE_SOURCE ../tcc.c -B.. -run tcctest.c > test.out3 > --- test.ref 2013-01-23 21:14:04.000000000 +0000 > +++ test.out3 2013-01-23 21:14:07.000000000 +0000 > > <snipping lots of diff output here> > > root@beaglebone:~/build/tinycc/tests# sdiff -s test.ref test.out3 > 1 2 0 0 0 0 0 0 0 0 | 1 2 > -1098053716 469762049 -1098053660 3775737 237576 -109805 > 1 2 0 4 0 0 0 3 0 0 | 1 2 237576 > 4 20 1074479592 28 3 8 -1098053624 > 97 98 99 0 0 0 0 0 0 0 | 97 98 99 0 > 141 190 0 208 49 64 > 2 3 0 0 0 0 4 0 0 0 | 2 3 > 1077007824 20 1074479592 28 4 8 -1098053624 1076077472 > 1 0 2 0 | 1 20 2 > -1098053772 > 4886718345 4026531841 120 | > -35179485370487 -305211113471 824633720952 > ftoi: 234 234 | ftoi: 235 > 235 > ftoi: -2334 0 | ftoi: 0 0 > ftoi: 234 234 | ftoi: 235 > 235 > ftoi: -2334 0 | ftoi: 0 0 > ftoi: 234 234 | ftoi: 235 > 235 > ftoi: -2334 0 | ftoi: 0 0 > 1.000000 2 3.000000 | 0.000000 > 1072693248 0.000000 > 1234567891234 987654321986 3 1234.000000 | > 8213168387073769472 -808124270273101537 229 0.000000 > 1.200000 2.300000 3.400000 | 0.000000 > 1903598371493484598915081361992312732437090761816988 > 1 2 3 4 5 6 7 8 0.100000 1.200000 2.300000 3.400000 4.500000 | 1 2 3 4 5 6 > 7 8 -0.000000 0.000000 19035983714934845989150813 > 1 2 3 4 5 6 7 8 0.100000 1.200000 2.300000 3.400000 4.500000 | 1 2 3 4 5 6 > 7 8 -0.000000 0.000000 19035983714934845989150813 > 1 2 3 4 5 6 7 8 0.100000 1.200000 2.300000 3.400000 4.500000 | 1 2 3 4 5 6 > 7 8 -0.000000 0.000000 19035983714934845989150813 > 1234567891234.000000 1 2 3 4 5 6 7 8 0.100000 1.200000 2.3000 | -0.000000 > 1114765087 1 2 3 4 5 6 7 -0.000000 0.000000 1903598 > 1 2 3 4 5 6 7 8 1234567891234.000000 | 1 2 3 4 5 6 > 7 8 -0.000000 > 1 2 3 4 5 6 7 8 0.100000 1.200000 2.300000 3.400000 4.500000 | 1 2 3 4 5 6 > 7 8 -0.000000 0.000000 19035983714934845989150813 > 1 2 3 4 5 6 7 8 0.100000 1.200000 2.300000 3.400000 4.500000 | 1 2 3 4 5 6 > 7 8 -0.000000 0.000000 19035983714934845989150813 > __builtin_types_compatible_p(char *, unsigned char *) = 0 | > __builtin_types_compatible_p(char *, unsigned char *) = 1 > root@beaglebone:~/build/tinycc/tests# > > <thinking the above is the set of relevant differences between the ref and > out3 files> > > This branch/version doesn't seem to have the tests2 directory, so I could > not easily repeat the 40_stdio.c test. However, the tests that are > performed complete without a Segmentation fault, unlike the previous > version.
Ah yeah, I forgot that tests2 was added later. But it suggests that the problem might indeed come from the hardfloat calling convention (or a later commit). You can have the tests2 tests by doing (after the git clone && git checkout you did): git cherry-pick 42c1b6ba380d9d1ab85f0cc21db07e71667cc682 Thanks a lot for your prompt answers and all the tests you do. > > Regards, Best regards, > > Jerry Thomas
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel