updates & cleanups (tcc-doc/Changelog/TODO ...)
- tcc-doc.texi: commandline option info update - Changelog/TODO: update - tests/tcctest.py: removed - tests/Makefile: weaktest fixed - tests/tests2: some files renamed and/or converted to unix LF - configure/Makefile: --enable-static option (no dll on win32) - win32/build-tcc.bat: msvc support - win32/tcc-win32.txt: build info update - win32/vs2015/: VS solution removed - win32/include/tcc/tcc_libm.h: #include statement fixed - tcc.c: -include <file> option help info - .gitignore: cleanup
This commit is contained in:
@ -187,7 +187,7 @@ speedtest: ex2 ex3
|
||||
|
||||
weaktest: tcctest.c test.ref
|
||||
$(TCC) -c $< -o weaktest.tcc.o
|
||||
$(CC) -c $< -o weaktest.gcc.o -I. $(CFLAGS)
|
||||
$(CC) -c $< -o weaktest.gcc.o $(NATIVE_DEFINES) $(CFLAGS) -w -O0 -std=gnu99 -fno-omit-frame-pointer
|
||||
objdump -t weaktest.tcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.tcc.o.txt
|
||||
objdump -t weaktest.gcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.gcc.o.txt
|
||||
diff weaktest.gcc.o.txt weaktest.tcc.o.txt && echo "Weak Auto Test OK"
|
||||
@ -254,7 +254,8 @@ cache: tcc_g
|
||||
# clean
|
||||
clean:
|
||||
rm -f *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.cc *.gcc \
|
||||
*-cc *-gcc *-tcc *.exe hello libtcc_test vla_test tcctest[1234] ex? tcc_g
|
||||
*-cc *-gcc *-tcc *.exe hello libtcc_test vla_test tcctest[1234] \
|
||||
ex? tcc_g *.def weaktest.*.txt
|
||||
$(MAKE) -C tests2 $@
|
||||
$(MAKE) -C pp $@
|
||||
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
import subprocess
|
||||
import sys
|
||||
import difflib
|
||||
|
||||
def main():
|
||||
reference = subprocess.check_output([sys.argv[1]])
|
||||
compare = subprocess.check_output(sys.argv[2:])
|
||||
failed = False
|
||||
for line in difflib.unified_diff(reference.split('\n'), compare.split('\n'), fromfile='cc', tofile='tcc', lineterm=''):
|
||||
failed = True
|
||||
print line
|
||||
sys.exit(1 if failed else 0)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
76
tests/tests2/86-memory-model.c → tests/tests2/86_memory-model.c
Executable file → Normal file
76
tests/tests2/86-memory-model.c → tests/tests2/86_memory-model.c
Executable file → Normal file
@ -1,38 +1,38 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
#if defined(__LLP64__)
|
||||
if (sizeof(short) == 2
|
||||
&& sizeof(int) == 4
|
||||
&& sizeof(long int) == 4
|
||||
&& sizeof(long long int) == 8
|
||||
&& sizeof(void*) == 8) {
|
||||
(void)printf("Ok\n");
|
||||
} else {
|
||||
(void)printf("KO __LLP64__\n");
|
||||
}
|
||||
#elif defined(__LP64__)
|
||||
if (sizeof(short) == 2
|
||||
&& sizeof(int) == 4
|
||||
&& sizeof(long int) == 8
|
||||
&& sizeof(long long int) == 8
|
||||
&& sizeof(void*) == 8) {
|
||||
(void)printf("Ok\n");
|
||||
} else {
|
||||
(void)printf("KO __LP64__\n");
|
||||
}
|
||||
#elif defined(__ILP32__)
|
||||
if (sizeof(short) == 2
|
||||
&& sizeof(int) == 4
|
||||
&& sizeof(long int) == 4
|
||||
&& sizeof(void*) == 4) {
|
||||
(void)printf("Ok\n");
|
||||
} else {
|
||||
(void)printf("KO __ILP32__\n");
|
||||
}
|
||||
#else
|
||||
(void)printf("KO no __*LP*__ defined.\n");
|
||||
#endif
|
||||
}
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
#if defined(__LLP64__)
|
||||
if (sizeof(short) == 2
|
||||
&& sizeof(int) == 4
|
||||
&& sizeof(long int) == 4
|
||||
&& sizeof(long long int) == 8
|
||||
&& sizeof(void*) == 8) {
|
||||
(void)printf("Ok\n");
|
||||
} else {
|
||||
(void)printf("KO __LLP64__\n");
|
||||
}
|
||||
#elif defined(__LP64__)
|
||||
if (sizeof(short) == 2
|
||||
&& sizeof(int) == 4
|
||||
&& sizeof(long int) == 8
|
||||
&& sizeof(long long int) == 8
|
||||
&& sizeof(void*) == 8) {
|
||||
(void)printf("Ok\n");
|
||||
} else {
|
||||
(void)printf("KO __LP64__\n");
|
||||
}
|
||||
#elif defined(__ILP32__)
|
||||
if (sizeof(short) == 2
|
||||
&& sizeof(int) == 4
|
||||
&& sizeof(long int) == 4
|
||||
&& sizeof(void*) == 4) {
|
||||
(void)printf("Ok\n");
|
||||
} else {
|
||||
(void)printf("KO __ILP32__\n");
|
||||
}
|
||||
#else
|
||||
(void)printf("KO no __*LP*__ defined.\n");
|
||||
#endif
|
||||
}
|
||||
2
tests/tests2/86-memory-model.expect → tests/tests2/86_memory-model.expect
Executable file → Normal file
2
tests/tests2/86-memory-model.expect → tests/tests2/86_memory-model.expect
Executable file → Normal file
@ -1 +1 @@
|
||||
Ok
|
||||
Ok
|
||||
@ -3,7 +3,7 @@ static void kb_wait_1(void)
|
||||
{
|
||||
unsigned long timeout = 2;
|
||||
do {
|
||||
(1 ?
|
||||
(1 ?
|
||||
printf("timeout=%ld\n", timeout) :
|
||||
({
|
||||
while (1)
|
||||
@ -17,7 +17,7 @@ static void kb_wait_2(void)
|
||||
{
|
||||
unsigned long timeout = 2;
|
||||
do {
|
||||
(1 ?
|
||||
(1 ?
|
||||
printf("timeout=%ld\n", timeout) :
|
||||
({
|
||||
for (;;)
|
||||
@ -31,7 +31,7 @@ static void kb_wait_2_1(void)
|
||||
{
|
||||
unsigned long timeout = 2;
|
||||
do {
|
||||
(1 ?
|
||||
(1 ?
|
||||
printf("timeout=%ld\n", timeout) :
|
||||
({
|
||||
do {
|
||||
@ -46,7 +46,7 @@ static void kb_wait_2_2(void)
|
||||
{
|
||||
unsigned long timeout = 2;
|
||||
do {
|
||||
(1 ?
|
||||
(1 ?
|
||||
printf("timeout=%ld\n", timeout) :
|
||||
({
|
||||
label:
|
||||
@ -61,7 +61,7 @@ static void kb_wait_3(void)
|
||||
{
|
||||
unsigned long timeout = 2;
|
||||
do {
|
||||
(1 ?
|
||||
(1 ?
|
||||
printf("timeout=%ld\n", timeout) :
|
||||
({
|
||||
int i = 1;
|
||||
@ -78,7 +78,7 @@ static void kb_wait_4(void)
|
||||
{
|
||||
unsigned long timeout = 2;
|
||||
do {
|
||||
(1 ?
|
||||
(1 ?
|
||||
printf("timeout=%ld\n", timeout) :
|
||||
({
|
||||
switch(timeout) {
|
||||
Reference in New Issue
Block a user