From ce5e12c2f950052d8109b6b7a56d900547705c08 Mon Sep 17 00:00:00 2001 From: James Lyon Date: Wed, 17 Apr 2013 21:51:51 +0100 Subject: Added ABI compatibility tests with native compiler using libtcc. Only one test so far, which fails on Windows (with MinGW as the native compiler - I've tested the MinGW output against MSVC and it appears the two are compatible). I've also had to modify tcc.h so that tcc_set_lib_path can point to the directory containing libtcc1.a on Windows to make the libtcc dependent tests work. I'm not sure this is the right way to fix this problem. --- tests/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index 5e4a6c9..f47ede4 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -13,6 +13,7 @@ TESTS = \ hello-run \ libtest \ test3 \ + abitest-exe \ moretests # test4 -- problem with -static @@ -177,6 +178,15 @@ asmtest: asmtest.ref objdump -D asmtest.o > asmtest.out @if diff -u --ignore-matching-lines="file format" asmtest.ref asmtest.out ; then echo "ASM Auto Test OK"; fi +# Check that code generated by libtcc is binary compatible with +# that generated by CC +abitest$(EXESUF): abitest.c $(top_builddir)/$(LIBTCC) + $(CC) -o $@ $^ $(CPPFLAGS) $(CFLAGS) $(NATIVE_DEFINES) $(LIBS) $(LINK_LIBTCC) $(LDFLAGS) -I$(top_srcdir) -g -O0 + +abitest-exe: abitest$(EXESUF) + @echo ------------ $@ ------------ + abitest$(EXESUF) lib_path=.. + # targets for development %.bin: %.c tcc $(TCC) -g -o $@ $< -- cgit v1.3.1