Thomas, > In preparation of the upcoming release of tinycc 0.9.26, I would like > to have reports about how tcc build and works to be sure it is as > stable as possible.I tried quickly on my arm machine and will > continue to do experiment on that machine and my amd64 machine but > I'd welcome any test from other people with different usage. In > particular, I would appreciate to have people build tcc for other > platform than Linux, for instance Windows (Grishka ;) or Mac OS (I > think there was some work to make tcc work on Mac OS but I'm not > sure). I performed some tests on a Linux x86 system with the various compilers available on that system. For all tests, GIT revision was fc574f14984d11f1ead50560d1bdc5ae0eaf6d8d === Build of TCC GIT with GCC 4.0.4 === Build failed because of -Wno-unused-result being unknown. /usr/bin/gcc-4.0.4 -o tcc.o -c tcc.c -DTCC_TARGET_I386 -I. -I/home/didier/documents/tech/dev/tcc/tinycc -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -m32 cc1: error: unrecognized command line option "-Wno-unused-result" make: *** [tcc.o] Error 1 === Build of TCC GIT with GCC 4.1.2 === Build failed because of -Wno-unused-result being unknown. /usr/bin/gcc-4.1.2 -o tcc.o -c tcc.c -DTCC_TARGET_I386 -I. -I/home/didier/documents/tech/dev/tcc/tinycc -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -m32 cc1: error: unrecognized command line option "-Wno-unused-result" make: *** [tcc.o] Error 1 === Build of TCC GIT with GCC 4.3.6 === Build failed because of -Wno-unused-result being unknown. /usr/bin/gcc-4.3.6 -o tcc.o -c tcc.c -DTCC_TARGET_I386 -I. -I/home/didier/documents/tech/dev/tcc/tinycc -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -m32 cc1: error: unrecognized command line option "-Wno-unused-result" make: *** [tcc.o] Error 1 === Build of TCC GIT with GCC 4.4.7 === Build OK. Tests OK. === Build of TCC GIT with GCC 4.5.4 === Build OK. Tests OK. === Build of TCC GIT with GCC 4.6.3 === Build OK. Tests OK. === Build of TCC GIT with GCC 4.7.2 === Build OK. Tests OK. === Build of TCC GIT with Clang 3.2 === Build OK (with some warnings, I can provide them to you if you want). Tests KO (see traces below). ------------ libtest ------------ ./libtcc_test lib_path=.. Hello World! fib(32) = 2178309 add(32, 64) = 96 cp ../include/tcclib.h . /usr/bin/clang -o tcctest.gcc tcctest.c -I. -I. -I/home/didier/documents/tech/dev/tcc/tinycc -w -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -m32 -DTCC_TARGET_I386 -std=gnu99 -O0 -fno-omit-frame-pointer tcctest.c:2585:3: error: void function 'cmp_comparison_test' should not return a value [-Wreturn-type] return 0; ^ ~ 1 error generated. make[1]: *** [test.ref] Error 1 make[1]: Leaving directory `/home/didier/documents/tech/dev/tcc/tinycc/tests' make: *** [test] Error 2 With the 'return' statement removed from the cmp_comparison_test() function, tests seem to be still KO. Example with 'test1': ------------ test1 ------------ ../tcc -B.. -DTCC_TARGET_I386 -run tcctest.c > test.out1 --- test.ref 2013年01月06日 10:59:06.000000000 +0100 +++ test.out1 2013年01月06日 10:59:06.000000000 +0100 @@ -299,7 +299,7 @@ sizeof(+(char)'a') = 4 sizeof(-(char)'a') = 4 sizeof(~(char)'a') = 4 --66 -66 -66 -66 4294967230 4294967230 +-66 -66 -66 -66 -66 -66 0x1 0xf0f0 (nil) 0xfffffff0 bitfield_test:sizeof(st1) = 8 3 -1 15 -8 121 I can do other tests and/or try patches to fix that problem if you want. === Build of TCC GIT with TCC GIT === Build OK. Tests KO. make -C tests2 test make[1]: Entering directory `/home/didier/documents/tech/dev/tcc/tinycc/tests2' Test: 00_assignment... Test: 01_comment... Test: 02_printf... Test: 03_struct... Test: 04_for... Test: 05_array... Test: 06_case... Test: 07_function... Test: 08_while... Test: 09_do_while... Test: 10_pointer... Test: 11_precedence... Test: 12_hashdefine... Test: 13_integer_literals... Test: 14_if... Test: 15_recursion... Test: 16_nesting... Test: 17_enum... Test: 18_include... Test: 19_pointer_arithmetic... Test: 20_pointer_comparison... Test: 21_char_array... Test: 22_floating_point... Test: 23_type_coercion... Test: 24_math_library... Test: 25_quicksort... Test: 26_character_constants... Test: 27_sizeof... Test: 28_strings... /bin/sh: line 5: 5741 Segmentation fault ../tcc -B.. -run 28_strings.c 2>&1 > 28_strings.output make[1]: *** [28_strings.test] Error 139 make[1]: Leaving directory `/home/didier/documents/tech/dev/tcc/tinycc/tests2' make: *** [test] Error 2 I can do other tests and/or try patches to fix that problem if you want. === Build of ROHC library with TCC GIT === Build OK. Tests OK. Those tests are performed every day: http://buildbot.rohc-lib.org:8011/builders/rohc-library-main-x86-tcc/builds/14 Some performance numbers on the ROHC code: GCC 4.7.2 build (-j1): 18.39 user 1.05 system 0:23.88 elapsed 81% CPU GCC 4.7.2 run tests (-j1): 7.59 user 3.27 system 0:36.12 elapsed 30% CPU Clang 3.2 build (-j1): 12.70 user 0.84 system 0:16.03 elapsed 84% CPU Clang 3.2 run tests (-j1): 7.98 user 3.20 system 0:36.89 elapsed 30% CPU TCC GIT build (-j1): 1.87 user 0.30 system 0:04.70 elapsed 46% CPU TCC GIT run tests (-j1): 9.79 user 3.25 system 0:37.61 elapsed Regards, Didier
Attachment:
signature.asc
Description: PGP signature