History

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

grischka committed 9 years ago

Commit 43d9a7d1 parent 13056da29 files · +221 −771Browse files

Unified · Split

29 files
  1. .gitignore +47 −55
  2. Changelog +25 −116
  3. Makefile +8 −6
  4. TODO +9 −19
  5. configure +19 −22
  6. tcc-doc.texi +33 −15
  7. tcc.c +1 −0
  8. tests/Makefile +3 −2
  9. tests/tcctest.py +0 −15
  10. tests/tests2/84_hex-float.c +0 −0
  11. tests/tests2/84_hex-float.expect +0 −0
  12. tests/tests2/85_asm-outside-function.c +0 −0
  13. tests/tests2/85_asm-outside-function.expect +0 −0
  14. tests/tests2/86_memory-model.c +38 −38
  15. tests/tests2/86_memory-model.expect +1 −1
  16. tests/tests2/89_nocode_wanted.c +6 −6
  17. tests/tests2/89_nocode_wanted.expect +0 −0
  18. tests/tests2/90_struct-init.c +0 −0
  19. tests/tests2/90_struct-init.expect +0 −0
  20. tests/tests2/91_ptr_longlong_arith32.c +0 −0
  21. tests/tests2/91_ptr_longlong_arith32.expect +0 −0
  22. win32/Makefile +1 −1
  23. win32/build-tcc.bat +20 −3
  24. win32/include/tcc/tcc_libm.h +1 −1
  25. win32/tcc-win32.txt +9 −6
  26. win32/vs2015/PreBuild.bat +0 −9
  27. win32/vs2015/libtcc.vcxproj +0 −220
  28. win32/vs2015/tcc.sln +0 −41
  29. win32/vs2015/tcc.vcxproj +0 −195
.gitignore+47−55
@@ -1,72 +1,64 @@
1+*~
2+\#*
3+.#*
14 *.o
25 *.a
3−a.out
46 *.exe
7+*.dll
8+*.obj
9+*.pdb
10+*.lib
11+*.exp
512 *.log
13+*.bz2
14+*.zip
15+.gdb_history
16+a.out
617 tcc_g
718 tcc
8−/*-tcc
9−tc2.c
10−doc
11−tc3s.c
12−p3.c
13−tc1.c
14−error.c
15−i386-gen1.c
16−test.out1
17−test.out1b
18−test.out2
19−test.out2b
20−test.out3
21−test.out3b
22−web.sh
23−memdebug.c
24−bench
25−Makefile.uClibc
26−boundtest
27−prog.ref
28−test.ref
29−test.out
30−tcc-doc.html
31−ideas
32−tcctest.ref
33−linux.tcc
34−ldtest
35−libtcc_test
36−instr.S
37−p.c
38−p2.c
39−tcctest[1234]
40−test[1234].out
41−tests/tcclib.h
42−tests/tcctest.cc
43−tests/weaktest.*.o.txt
44−tests/tests2/fred.txt
45−tests/tests2/*.exe
46−tests/hello
47−tests/abitest-*cc
48−tests/vla_test
49−.gdb_history
50−tcc.1
51−tcc.pod
19+*-tcc
20+
5221 config.h
5322 config.mak
5423 config.texi
24+conftest*
5525 tags
5626 TAGS
57−.DS_Store
58−*.swp
27+tcc.1
28+tcc.pod
29+tcc-doc.html
30+tcc-doc.info
31+
5932 lib/x86_64
6033 lib/i386
6134 lib/x86_64-win32
6235 lib/i386-win32
6336 lib/arm
6437 lib/arm64
65−tcc-doc.info
66−conftest*
67−tiny_libmaker
68−*.dSYM
69−*~
70−\#*
71−.#*
72−win32/*
38+
39+win32/doc
40+win32/libtcc
41+win32/lib/32
42+win32/lib/64
43+win32/include/float.h
44+win32/include/stdarg.h
45+win32/include/stdbool.h
46+win32/include/stddef.h
47+win32/include/varargs.h
48+win32/include/tcclib.h
49+
50+tests/test.out*
51+tests/test*.out
52+tests/tcctest[1234]
53+tests/tcctest.gcc
54+tests/*.ref
55+tests/*.txt
56+tests/*.gcc
57+tests/*-cc*
58+tests/*-tcc*
59+tests/libtcc_test
60+tests/vla_test
61+tests/hello
62+tests/tests2/fred.txt
63+
64+libtcc*.def
Changelog+25−116
@@ -1,126 +1,35 @@
11 Version 0.9.27:
22
3−Licensing:
4−
5−- TinyCC partly relicensed to MIT license
6−
73 User interface:
4+- -x[c|a|n] filetype option (Sergey Korshunoff)
5+- -P[1], -dD, -dM preprocessor options (Sergey Korshunoff)
6+- -Wl,-(no-)whole-archive linker option (Reuben Thomas)
7+- -mms-bitfields option (David Mertens)
8+- -include <file> option (Michael Matz)
9+- @listfile support (Vlad Vissoultchev)
10+- CPATH, C_INCLUDE_PATH and LD_LIBRARY_PATH environment variables support
11+ (Andrew Aladjev, Urs Janssen)
812
9−- define __STDC_HOSTED__ (Michael Matz, Urs Janssen)
10−- added support for CPATH, C_INCLUDE_PATH and LD_LIBRARY_PATH (Andrew Aladjev
11−and Urs Janssen)
12−- added option -norunsrc to control argv[0] with tcc -run (James Lyon)
13−- improve --with-libgcc configure help (grischka)
14−- improve error message when memory is full (grischka)
15−- improve wording about compiler switches in documentation (Thomas Preud'homme)
16−- use GNU triplet prefix for cross compiler names (Thomas Preud'homme)
17−- ignore unknown linker optimization and as-needed option (Austin English)
13+Platforms:
14+- new AARCH64 (arm64) target (Edmund Grimley Evans)
15+- vastly improved support for ARM hard float calling convention
16+ (Thomas Preud'homme, Daniel Glöckner)
17+- provide a runtime library for ARM (Thomas Preud'homme)
18+- many x86-64 ABI fixes incl. XMM register passing and tests (James Lyon)
19+- ABI tests with native compiler using libtcc (James Lyon)
1820
1921 Features:
22+- VLA (variable length array) improved (James Lyon, Pip Cet)
23+- import functions by ordinal in .def files on windows (YX Hao)
24+- x86/x86-64 assembler much improved (Michael Matz)
25+- simple dead code suppression (Edmund Grimley Evans, Michael Matz, grischka)
26+- implement round/fmin/fmax etc. math on windows (Avi Halachmi)
27+- #pragma once support (Sergey Korshunoff, Vlad Vissoultchev, ...)
28+- switch/case code improved (Zdenek Pavlas)
29+- ~15% faster by TinyAlloc fast memory allocator (Vlad Vissoultchev)
2030
21−- added ABI tests with native compiler using libtcc (James Lyon)
22−- added CMake build system with support for cross-compilation (James Lyon)
23−- improved variable length array support (James Lyon)
24−- add the possibility to use noname functions by ordinal (YX Hao)
25−- add a install-strip target to install tcc (Thomas Preud'homme)
26−- add runtime selection of float ABI on ARM (Thomas Preud'homme)
27−- add shared lib support on x86-64 (Michael Matz)
28−
29−Platforms:
30−- support Debian GNU/kfreeBSD 64bit userspace (Thomas Preud'homme)
31−- fix GNU/Hurd interpreter path (Thomas Preud'homme)
32−- fix configure script for FreeBSD host (Thomas Preud'homme)
33−- make tcc -run work reliably on ARM by flushing caches (Thomas Preud'homme)
34−- many x86-64 ABI fixes incl. XMM register passing (James Lyon)
35−- improve compatibility with mingw's long double (James Lyon)
36−- avoid .stabstr section name to be truncated on win32 (Roy)
37−- add support for load/store of _Bool value (Thomas Preud'homme)
38−- detect instruction with incorrect operands on x86-64 (Thomas Preud'homme)
39−- improved relocations on ARM (Thomas Preud'homme)
40−- add va_* macro implementation for ARM (Thomas Preud'homme)
41−- define __ARM_EABI__, __ARMEL__ and __ARM_PCS_VFP (Thomas Preud'homme)
42−- provide a runtime library for ARM (Thomas Preud'homme)
43−- vastly improved support for ARM hard float calling convention
44−(Thomas Preud'homme, Daniel Glöckner)
45−- tcc can uses libtcc1 on ARM (Thomas Preud'homme)
46−- use __fixdfdi for all float to integer conversion (grischka)
47−- simplify startup code for unix platforms (grischka)
48−- improve ELF generated on ARM (Thomas Preud'homme)
49−- add support for thumb to ARM relocation (Thomas Preud'homme)
50−- fix globbing to match MSVC on Windows (Thomas Preud'homme)
51−- deprecate FPA and OABI support for ARM (Thomas Preud'homme)
52−- warn about softfloat not being supported on ARM (Thomas Preud'homme)
53−
54−Bug fixes:
55−- many code clean up (Urs Janssen, grischka)
56−- fixes of other's patches (grischka, Ramsay Jones, Michael Matz)
57−- fix documentation about __TINYC__ (Urs Janssen)
58−- improve build of documentation (Urs Janssen)
59−- improve build instructions (Jov)
60−- switch from texi2html to makeinfo --html to build tcc-doc.html (James Lyon)
61−- improve out of tree build (James Lyon)
62−- improved passing and returning of struct (James Lyon)
63−- fix CMake build on i386 and x86-64 (James Lyon)
64−- fix i386 calling convention issue (James Lyon)
65−- fix error in Windows build of tests (James Lyon)
66−- fix x86-64 long double passing (James Lyon)
67−- fix crash with undefined struct (grischka)
68−- normalize slashes on win32 to always use backslashes (grischka)
69−- use runtime function for float to int conversion on i386 (grischka)
70−- improved documentation for include and lib lookup on win32 (grischka)
71−- detect redefinition of function (Thomas Preud'homme)
72−- detect the use of array of functions (Thomas Preud'homme)
73−- detect use of enumerator with wrong enumeration (Thomas Preud'homme)
74−- detect redefinition of enumerator or enumeration (Thomas Preud'homme)
75−- set the user-defined library search paths first (Vittorio Giovara)
76−- detect usage of incomplete types inside struct/union (Amine Najahi)
77−- various macro bug fixes (Joseph Poirier)
78−- avoid wrong trigger of assert on x86-64 platform (Thomas Preud'homme)
79−- fix NaN comparison (Thomas Preud'homme)
80−- use libtcc for static linking with runtime library (Thomas Preud'homme)
81−- fix negation of 0.0 and -0.0 values (Thomas Preud'homme)
82−- fix use of long long as if condition (Thomas Preud'homme)
83−- disable bound check if libgcc is used (Thomas Preud'homme)
84−- error out when casting to void (grischka)
85−- remove circular dependency in Makefile (grischka)
86−- stop preventing gcc to do strict aliasing (grischka)
87−- fix Windows build of tcc (grischka)
88−- build runtime library for arm cross compiler (Thomas Preud'homme)
89−- fix installation of arm cross-compiler (Thomas Preud'homme)
90−- add basic test for cross-compiler (Thomas Preud'homme)
91−- fix failure when generating PE on x86-64 (Archidemon)
92−- fix floating point unary minus and plus (Michael Matz)
93−- add more tests for signed zero float (Michael Matz)
94−- fix precision of double on x86-64 (Vincent Lefevre)
95−- fix bound checking of argv with -run switch (Kirill Smelkov)
96−- work around a wine cmd bug when building tcc on Windows (Austin English)
97−- reenable some bound check tests (grischka)
98−- boundtest.c lookup honors VPATH (grischka)
99−- diff compared to CC in test[123]b? are now errors (grischka)
100−- fix test3 on Windows (grischka)
101−- prevent gcc from building (non functional) libtcc.a (grischka)
102−- fix warning related to PE file generation on x86-64 (grischka)
103−- stop mixing ordinary and implicit rule in Makefile (Iavael)
104−- fix integer to double conversion on ARM (Thomas Preud'homme)
105−- fix parameter passing of structure < 4 bytes on ARM (Thomas Preud'homme)
106−- disable builtin_frame_address test on ARM due to gcc bug (Thomas Preud'homme)
107−- fix initialization of struct on ARM (Thomas Preud'homme)
108−- fix parameter passing of (unsigned) long long bitfield (Thomas Preud'homme)
109−- improve float to integer tests (Thomas Preud'homme)
110−- fix relocation of Thumb branch to ARM function (Thomas Preud'homme)
111−- fix char wrong compatibility with [un]signed char (Thomas Preud'homme)
112−- choose the code to compile based on target in libtcc1 (Thomas Preud'homme)
113−- fix various clang warnings (Thomas Preud'homme)
114−- don't hardcode tcc in Makefile for tests (Thomas Preud'homme)
115−- fix relocation of __bound_init bound checking code (Thomas Preud'homme)
116−- accept only one basic type for a given variable (Thomas Preud'homme)
117−- fix error when using va_* with tcc using libgcc (Thomas Preud'homme)
118−- support GOT32 and PLT32 reloc on the same symbol (Thomas Preud'homme)
119−- fix memory leak due to symbol attributes (mingodad)
120−- partially fix bound checking of argv and arge (Thomas Preud'homme)
121−- fix possible dereference when getting name of symbol (grischka)
122−- fix va_list type definition on x86-64 (Daniel Glöckner)
123−- reduce number of scan-build false positive (mingodad)
31+Licensing:
32+- TinyCC partly relicensed to MIT license (See RELICENSING file).
12433
12534 version 0.9.26:
12635
Makefile+8−6
@@ -26,14 +26,16 @@ LINK_LIBTCC = · 25 unmodified lines
2626 LIBS =
2727
2828 ifdef CONFIG_WIN32
29− LIBTCC = libtcc.dll
29+ ifneq ($(DISABLE_STATIC),no)
30+ LIBTCC = libtcc.dll
31+ endif
3032 else
3133 LIBS=-lm
3234 ifndef CONFIG_NOLDL
3335 LIBS+=-ldl
3436 endif
3537 # make libtcc as static or dynamic library?
36− ifdef DISABLE_STATIC
38+ ifeq ($(DISABLE_STATIC),yes)
3739 LIBTCC=libtcc.so
3840 ifndef DISABLE_RPATH
3941 LINK_LIBTCC += -Wl,-rpath,"$(libdir)"
@@ -92,7 +94,7 @@ ARM64_FILES = $(CORE_FILES) arm64-gen.c arm64-link.c · 52 unmodified lines
9294 C67_FILES = $(CORE_FILES) c67-gen.c c67-link.c tcccoff.c
9395
9496 ifdef CONFIG_WIN32
95− PROGS+=tiny_impdef$(EXESUF) tiny_libmaker$(EXESUF) $(LIBTCC)
97+ PROGS+=tiny_impdef$(EXESUF) tiny_libmaker$(EXESUF)
9698 ifeq ($(ARCH),x86-64)
9799 NATIVE_FILES=$(WIN64_FILES)
98100 PROGS_CROSS=$(WIN32_CROSS) $(X64_CROSS) $(ARM_CROSS) $(ARM64_CROSS) $(C67_CROSS) $(WINCE_CROSS)
@@ -272,14 +274,14 @@ install: · 173 unmodified lines
272274 mkdir -p "$(tccdir)/examples"
273275 mkdir -p "$(tccdir)/doc"
274276 mkdir -p "$(tccdir)/libtcc"
275− $(INSTALLBIN) -m755 $(PROGS) "$(tccdir)"
277+ $(INSTALLBIN) -m755 $(PROGS) $(subst libtcc.a,,$(LIBTCC)) "$(tccdir)"
276278 $(INSTALL) -m644 libtcc1.a $(TOPSRC)/win32/lib/*.def "$(tccdir)/lib"
277279 cp -r $(TOPSRC)/win32/include/. "$(tccdir)/include"
278280 cp -r $(TOPSRC)/win32/examples/. "$(tccdir)/examples"
279281 cp $(TOPSRC)/tests/libtcc_test.c "$(tccdir)/examples"
280282 $(INSTALL) -m644 $(TOPSRC)/include/*.h $(TOPSRC)/tcclib.h "$(tccdir)/include"
281− $(INSTALL) -m644 tcc-doc.html $(TOPSRC)/win32/tcc-win32.txt "$(tccdir)/doc"
282− $(INSTALL) -m644 $(TOPSRC)/libtcc.h libtcc.def "$(tccdir)/libtcc"
283+ $(INSTALL) -m644 $(TOPSRC)/libtcc.h $(subst .dll,.def,$(LIBTCC)) "$(tccdir)/libtcc"
284+ -$(INSTALL) -m644 $(TOPSRC)/win32/tcc-win32.txt tcc-doc.html "$(tccdir)/doc"
283285 ifdef CONFIG_CROSS
284286 mkdir -p "$(tccdir)/lib/32"
285287 mkdir -p "$(tccdir)/lib/64"
TODO+9−19
@@ -2,16 +2,8 @@ TODO list: · 1 unmodified line
22
33 Bugs:
44
5−- fix macro substitution with nested definitions (ShangHongzhang)
65 - FPU st(0) is left unclean (kwisatz haderach). Incompatible with
76 optimized gcc/msc code
8−
9−- constructors
10−- cast bug (Peter Wang)
11−- define incomplete type if defined several times (Peter Wang).
12−- test binutils/gcc compile
13−- tci patch + argument.
14−- see -lxxx bug (Michael Charity).
157 - see transparent union pb in /urs/include/sys/socket.h
168 - precise behaviour of typeof with arrays ? (__put_user macro)
179 but should suffice for most cases)
@@ -26,11 +18,10 @@ Bugs: · 8 unmodified lines
2618 - finish varargs.h support (gcc 3.2 testsuite issue)
2719 - fix static functions declared inside block
2820 - fix multiple unions init
29−- sizeof, alignof, typeof can still generate code in some cases.
30−- Fix the remaining libtcc memory leaks.
3121 - make libtcc fully reentrant (except for the compilation stage itself).
3222 - struct/union/enum definitions in nested scopes (see also Debian bug #770657)
3323 - __STDC_IEC_559__: float f(void) { static float x = 0.0 / 0.0; return x; }
24+- memory may be leaked after errors (longjmp).
3425
3526 Portability:
3627
@@ -42,14 +33,10 @@ Portability: · 5 unmodified lines
4233
4334 Linking:
4435
45−- static linking does not work
46−- with "-run" and libtcc, no PLT is used, so branches may be out of
47− range and relocations may fail; as a result libtest fails on arm64; see:
48− https://lists.gnu.org/archive/html/tinycc-devel/2015-03/msg00111.html
36+- static linking (-static) does not work
4937
5038 Bound checking:
5139
52−- '-b' bug.
5340 - fix bound exit on RedHat 7.3
5441 - setjmp is not supported properly in bound checking.
5542 - fix bound check code with '&' on local variables (currently done
@@ -61,11 +48,10 @@ Missing features: · 5 unmodified lines
6148
6249 - disable-asm and disable-bcheck options
6350 - __builtin_expect()
64−- improve '-E' option.
6551 - atexit (Nigel Horne)
66−- packed attribute
6752 - C99: add complex types (gcc 3.2 testsuite issue)
6853 - postfix compound literals (see 20010124-1.c)
54+- interactive mode / integrated debugger
6955
7056 Optimizations:
7157
@@ -81,9 +67,8 @@ Not critical: · 9 unmodified lines
8167 normative example - only relevant when using gotos! -> must add
8268 boolean variable to tell if compound literal was already
8369 initialized).
84−- add PowerPC or ARM code generator and improve codegen for RISC (need
70+- add PowerPC generator and improve codegen for RISC (need
8571 to suppress VT_LOCAL and use a base register instead).
86−- interactive mode / integrated debugger
8772 - fix preprocessor symbol redefinition
8873 - add portable byte code generator and interpreter for other
8974 unsupported architectures.
@@ -108,3 +93,8 @@ Fixed (probably): · 18 unmodified lines
10893 - #include_next support for /usr/include/limits ?
10994 - function pointers/lvalues in ? : (linux kernel net/core/dev.c)
11095 - win32: add __stdcall, check GetModuleHandle for dlls.
96+- macro substitution with nested definitions (ShangHongzhang)
97+- with "-run" and libtcc, a PLT is now built.
98+- '-E' option was improved
99+- packed attribute is now supported
100+- ARM and ARM64 code generators have been added.
configure+19−22
@@ -19,6 +19,7 @@ TMPH=$TMPN.h · 18 unmodified lines
1919 # default parameters
2020 build_cross="no"
2121 use_libgcc="no"
22+disable_static=""
2223 prefix=""
2324 execprefix=""
2425 bindir=""
@@ -53,6 +54,7 @@ targetos=`uname` · 28 unmodified lines
5354 case $targetos in
5455 MINGW*) mingw32=yes;;
5556 MSYS*) mingw32=yes;;
57+ CYGWIN*) mingw32=yes; cygwin=yes; cross_prefix="mingw32-";;
5658 DragonFly) noldl=yes;;
5759 OpenBSD) noldl=yes;;
5860 FreeBSD) noldl=yes;;
@@ -69,6 +71,8 @@ source_path_used="yes" · 10 unmodified lines
6971 if test -z "$source_path" -o "$source_path" = "." ; then
7072 source_path=`pwd`
7173 source_path_used="no"
74+ # mingw compilers might not understand cygwin paths
75+ if test $cygwin = "yes"; then source_path="."; fi
7276 fi
7377
7478 for opt do
@@ -126,12 +130,12 @@ for opt do · 51 unmodified lines
126130 ;;
127131 --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86
128132 ;;
129− --enable-cygwin) mingw32="yes" ; cygwin="yes" ; cross_prefix="mingw32-" ; cpu=x86
130− ;;
131133 --enable-cross) build_cross="yes"
132134 ;;
133135 --disable-static) disable_static="yes"
134136 ;;
137+ --enable-static) disable_static="no"
138+ ;;
135139 --disable-rpath) disable_rpath="yes"
136140 ;;
137141 --strip-binaries) strip_binaries="yes"
@@ -288,12 +292,12 @@ Advanced options (experts only): · 150 unmodified lines
288292 --cpu=CPU CPU [$cpu]
289293 --strip-binaries strip symbol tables from resulting binaries
290294 --disable-static make libtcc.so instead of libtcc.a
295+ --enable-static make libtcc.a instead of libtcc.dll (win32)
291296 --disable-rpath disable use of -rpath with the above
292297 --with-libgcc use libgcc_s.so.1 instead of libtcc1.a in dynamic link
293298 --enable-mingw32 build windows version on linux with mingw32
294− --enable-cygwin build windows version on windows with cygwin
295299 --enable-cross build cross compilers
296− --with-selinux use mmap for exec mem [needs writable /tmp]
300+ --with-selinux use mmap for executable memory (with tcc -run)
297301 --sysincludepaths=... specify system include paths, colon separated
298302 --libpaths=... specify system library paths, colon separated
299303 --crtprefix=... specify locations of crt?.o, colon separated
@@ -309,15 +313,16 @@ ar="${cross_prefix}${ar}" · 9 unmodified lines
309313 strip="${cross_prefix}${strip}"
310314
311315 CONFTEST=./conftest$EXESUF
316+if ! $cc -o $CONFTEST $source_path/conftest.c 2>/dev/null ; then
317+ echo "configure: error: '$cc' failed to compile conftest.c."
318+else
319+ gcc_major="$($CONFTEST version)"
320+ gcc_minor="$($CONFTEST minor)"
321+fi
312322
313323 if test -z "$cross_prefix" ; then
314− if ! $cc -o $CONFTEST $source_path/conftest.c 2>/dev/null ; then
315− echo "configure: error: '$cc' failed to compile conftest.c."
316− else
317− bigendian="$($CONFTEST bigendian)"
318− gcc_major="$($CONFTEST version)"
319− gcc_minor="$($CONFTEST minor)"
320− if test "$mingw32" = "no" ; then
324+ bigendian="$($CONFTEST bigendian)"
325+ if test "$mingw32" = "no" ; then
321326
322327 if test -z "$triplet"; then
323328 tt="$($CONFTEST triplet)"
@@ -348,8 +353,6 @@ if test -z "$cross_prefix" ; then · 24 unmodified lines
348353 if test -f "/lib/ld-uClibc.so.0" ; then
349354 confvars="$confvars uClibc"
350355 fi
351−
352− fi
353356 fi
354357 else
355358 # if cross compiling, cannot launch a program, so make a static guess
@@ -365,7 +368,7 @@ for i in $W_OPTIONS; do · 9 unmodified lines
365368 O_PRESENT="$(grep -- -W$i cc_help.txt)"
366369 if test -n "$O_PRESENT"; then CFLAGS="$CFLAGS -W$i"; fi
367370 done
368−W_OPTIONS="deprecated-declarations strict-aliasing pointer-sign sign-compare unused-result uninitialized"
371+W_OPTIONS="pointer-sign sign-compare unused-result"
369372 for i in $W_OPTIONS; do
370373 O_PRESENT="$(grep -- -W$i cc_help.txt)"
371374 if test -n "$O_PRESENT"; then CFLAGS="$CFLAGS -Wno-$i"; fi
@@ -481,12 +484,6 @@ fi · 109 unmodified lines
481484 if test "$mingw32" = "yes" ; then
482485 echo "CONFIG_WIN32=yes" >> config.mak
483486 fi
484−if test "$cygwin" = "yes" ; then
485− echo "#ifndef _WIN32" >> $TMPH
486− echo "# define _WIN32" >> $TMPH
487− echo "#endif" >> $TMPH
488− echo "AR=ar" >> config.mak
489−fi
490487 if test "$bigendian" = "yes" ; then
491488 echo "WORDS_BIGENDIAN=yes" >> config.mak
492489 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
@@ -498,8 +495,8 @@ fi · 5 unmodified lines
498495 if test "$build_cross" = "yes" ; then
499496 echo "CONFIG_CROSS=yes" >> config.mak
500497 fi
501−if test "$disable_static" = "yes" ; then
502− echo "DISABLE_STATIC=yes" >> config.mak
498+if test -n "$disable_static" ; then
499+ echo "DISABLE_STATIC=$disable_static" >> config.mak
503500 fi
504501 if test "$disable_rpath" = "yes" ; then
505502 echo "DISABLE_RPATH=yes" >> config.mak
tcc-doc.texi+33−15
@@ -176,29 +176,15 @@ In a script, it gives the following header: · 175 unmodified lines
176176 #!/usr/local/bin/tcc -run -L/usr/X11R6/lib -lX11
177177 @end example
178178
179−@item -mms-bitfields
180−Use an algorithm for bitfield alignment consistent with MSVC. Default is
181−gcc's algorithm.
182−
183−@item -mfloat-abi (ARM only)
184−Select the float ABI. Possible values: @code{softfp} and @code{hard}
185−
186−@item -dumpversion
187−Print only the compiler version and nothing else.
188−
189179 @item -v
190180 Display TCC version.
191181
192182 @item -vv
193−Show included files. As sole argument, print search dirs (as below).
183+Show included files. As sole argument, print search dirs. -vvv shows tries too.
194184
195185 @item -bench
196186 Display compilation statistics.
197187
198−@item -print-search-dirs
199−Print the configured installation directory and a list of library
200−and include directories tcc will search.
201−
202188 @end table
203189
204190 Preprocessor options:
@@ -220,6 +206,10 @@ also be defined: @option{-DF(a)=a+1} · 15 unmodified lines
220206
221207 @item -Usym
222208 Undefine preprocessor symbol @samp{sym}.
209+
210+@item -E
211+Preprocess only, to stdout or file (with -o).
212+
223213 @end table
224214
225215 Compilation flags:
@@ -337,6 +327,9 @@ Modify executable layout. · 111 unmodified lines
337327 @item -Wl,-Bsymbolic
338328 Set DT_SYMBOLIC tag.
339329
330+@item -Wl,-(no-)whole-archive
331+Turn on/off linking of all objects in archives.
332+
340333 @end table
341334
342335 Debugger options:
@@ -370,6 +363,31 @@ Generate makefile fragment with dependencies. · 27 unmodified lines
370363 @item -MF depfile
371364 Use @file{depfile} as output for -MD.
372365
366+@item -print-search-dirs
367+Print the configured installation directory and a list of library
368+and include directories tcc will search.
369+
370+@item -dumpversion
371+Print version.
372+
373+@end table
374+
375+Target specific options:
376+
377+@table @option
378+@item -mms-bitfields
379+Use an algorithm for bitfield alignment consistent with MSVC. Default is
380+gcc's algorithm.
381+
382+@item -mfloat-abi (ARM only)
383+Select the float ABI. Possible values: @code{softfp} and @code{hard}
384+
385+@item -mno-sse
386+Do not use sse registers on x86-64
387+
388+@item -m32, -m64
389+Pass command line to the i386/x86-64 cross compiler.
390+
373391 @end table
374392
375393 Note: GCC options @option{-Ox}, @option{-fx} and @option{-mx} are
tcc.c+1−0
@@ -109,6 +109,7 @@ static void help(void) · 108 unmodified lines
109109 " -E preprocess only\n"
110110 " -P[1] no / alternative #line output with -E\n"
111111 " -dD -dM output #define directives with -E\n"
112+ " -include file include file above each input file\n"
112113 "Linker options:\n"
113114 " -Ldir add library path 'dir'\n"
114115 " -llib link with dynamic or static library 'lib'\n"
tests/Makefile+3−2
@@ -187,7 +187,7 @@ speedtest: ex2 ex3 · 186 unmodified lines
187187
188188 weaktest: tcctest.c test.ref
189189 $(TCC) -c $< -o weaktest.tcc.o
190− $(CC) -c $< -o weaktest.gcc.o -I. $(CFLAGS)
190+ $(CC) -c $< -o weaktest.gcc.o $(NATIVE_DEFINES) $(CFLAGS) -w -O0 -std=gnu99 -fno-omit-frame-pointer
191191 objdump -t weaktest.tcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.tcc.o.txt
192192 objdump -t weaktest.gcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.gcc.o.txt
193193 diff weaktest.gcc.o.txt weaktest.tcc.o.txt && echo "Weak Auto Test OK"
@@ -254,7 +254,8 @@ cache: tcc_g · 60 unmodified lines
254254 # clean
255255 clean:
256256 rm -f *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.cc *.gcc \
257−*-cc *-gcc *-tcc *.exe hello libtcc_test vla_test tcctest[1234] ex? tcc_g
257+ *-cc *-gcc *-tcc *.exe hello libtcc_test vla_test tcctest[1234] \
258+ ex? tcc_g *.def weaktest.*.txt
258259 $(MAKE) -C tests2 $@
259260 $(MAKE) -C pp $@
260261
tests/tcctest.py+0−15
@@ -1,15 +0,0 @@
1−import subprocess
2−import sys
3−import difflib
4−
5−def main():
6− reference = subprocess.check_output([sys.argv[1]])
7− compare = subprocess.check_output(sys.argv[2:])
8− failed = False
9− for line in difflib.unified_diff(reference.split('\n'), compare.split('\n'), fromfile='cc', tofile='tcc', lineterm=''):
10− failed = True
11− print line
12− sys.exit(1 if failed else 0)
13−
14−if __name__ == '__main__':
15− main()
tests/tests2/84_hex-float.crenamed from tests/tests2/84-hex-float.c+0−0

File renamed without changes.

tests/tests2/84_hex-float.expectrenamed from tests/tests2/84-hex-float.expect+0−0

File renamed without changes.

tests/tests2/85_asm-outside-function.crenamed from tests/tests2/85-asm-outside-function.c+0−0

File renamed without changes.

tests/tests2/85_asm-outside-function.expectrenamed from tests/tests2/85-asm-outside-function.expect+0−0

File renamed without changes.

tests/tests2/86_memory-model.crenamed from tests/tests2/86-memory-model.c+38−38
@@ -1,38 +1,38 @@
1−#include <stdio.h>
2−
3−int
4−main()
5−{
6−#if defined(__LLP64__)
7− if (sizeof(short) == 2
8− && sizeof(int) == 4
9− && sizeof(long int) == 4
10− && sizeof(long long int) == 8
11− && sizeof(void*) == 8) {
12− (void)printf("Ok\n");
13− } else {
14− (void)printf("KO __LLP64__\n");
15− }
16−#elif defined(__LP64__)
17− if (sizeof(short) == 2
18− && sizeof(int) == 4
19− && sizeof(long int) == 8
20− && sizeof(long long int) == 8
21− && sizeof(void*) == 8) {
22− (void)printf("Ok\n");
23− } else {
24− (void)printf("KO __LP64__\n");
25− }
26−#elif defined(__ILP32__)
27− if (sizeof(short) == 2
28− && sizeof(int) == 4
29− && sizeof(long int) == 4
30− && sizeof(void*) == 4) {
31− (void)printf("Ok\n");
32− } else {
33− (void)printf("KO __ILP32__\n");
34− }
35−#else
36− (void)printf("KO no __*LP*__ defined.\n");
37−#endif
38−}
1+#include <stdio.h>
2+
3+int
4+main()
5+{
6+#if defined(__LLP64__)
7+ if (sizeof(short) == 2
8+ && sizeof(int) == 4
9+ && sizeof(long int) == 4
10+ && sizeof(long long int) == 8
11+ && sizeof(void*) == 8) {
12+ (void)printf("Ok\n");
13+ } else {
14+ (void)printf("KO __LLP64__\n");
15+ }
16+#elif defined(__LP64__)
17+ if (sizeof(short) == 2
18+ && sizeof(int) == 4
19+ && sizeof(long int) == 8
20+ && sizeof(long long int) == 8
21+ && sizeof(void*) == 8) {
22+ (void)printf("Ok\n");
23+ } else {
24+ (void)printf("KO __LP64__\n");
25+ }
26+#elif defined(__ILP32__)
27+ if (sizeof(short) == 2
28+ && sizeof(int) == 4
29+ && sizeof(long int) == 4
30+ && sizeof(void*) == 4) {
31+ (void)printf("Ok\n");
32+ } else {
33+ (void)printf("KO __ILP32__\n");
34+ }
35+#else
36+ (void)printf("KO no __*LP*__ defined.\n");
37+#endif
38+}
tests/tests2/86_memory-model.expectrenamed from tests/tests2/86-memory-model.expect+1−1
@@ -1 +1 @@
1−Ok
1+Ok
tests/tests2/89_nocode_wanted.crenamed from tests/tests2/82_nocode_wanted.c+6−6
@@ -3,7 +3,7 @@ static void kb_wait_1(void) · 2 unmodified lines
33 {
44 unsigned long timeout = 2;
55 do {
6− (1 ?
6+ (1 ?
77 printf("timeout=%ld\n", timeout) :
88 ({
99 while (1)
@@ -17,7 +17,7 @@ static void kb_wait_2(void) · 7 unmodified lines
1717 {
1818 unsigned long timeout = 2;
1919 do {
20− (1 ?
20+ (1 ?
2121 printf("timeout=%ld\n", timeout) :
2222 ({
2323 for (;;)
@@ -31,7 +31,7 @@ static void kb_wait_2_1(void) · 7 unmodified lines
3131 {
3232 unsigned long timeout = 2;
3333 do {
34− (1 ?
34+ (1 ?
3535 printf("timeout=%ld\n", timeout) :
3636 ({
3737 do {
@@ -46,7 +46,7 @@ static void kb_wait_2_2(void) · 8 unmodified lines
4646 {
4747 unsigned long timeout = 2;
4848 do {
49− (1 ?
49+ (1 ?
5050 printf("timeout=%ld\n", timeout) :
5151 ({
5252 label:
@@ -61,7 +61,7 @@ static void kb_wait_3(void) · 8 unmodified lines
6161 {
6262 unsigned long timeout = 2;
6363 do {
64− (1 ?
64+ (1 ?
6565 printf("timeout=%ld\n", timeout) :
6666 ({
6767 int i = 1;
@@ -78,7 +78,7 @@ static void kb_wait_4(void) · 10 unmodified lines
7878 {
7979 unsigned long timeout = 2;
8080 do {
81− (1 ?
81+ (1 ?
8282 printf("timeout=%ld\n", timeout) :
8383 ({
8484 switch(timeout) {
tests/tests2/89_nocode_wanted.expectrenamed from tests/tests2/82_nocode_wanted.expect+0−0

File renamed without changes.

tests/tests2/90_struct-init.crenamed from tests/tests2/86-struct-init.c+0−0

File renamed without changes.

tests/tests2/90_struct-init.expectrenamed from tests/tests2/86-struct-init.expect+0−0

File renamed without changes.

tests/tests2/91_ptr_longlong_arith32.crenamed from tests/tests2/87_ptr_longlong_arith32.c+0−0

File renamed without changes.

tests/tests2/91_ptr_longlong_arith32.expectrenamed from tests/tests2/87_ptr_longlong_arith32.expect+0−0

File renamed without changes.

win32/Makefile+1−1
@@ -110,7 +110,7 @@ tarball: · 109 unmodified lines
110110 @cp -r lib $(TARNAME)
111111 @cp -r libtcc $(TARNAME)
112112 @cp -r tools $(TARNAME)
113− @cp -r vs2015 $(TARNAME)
113+# @cp -r vs2015 $(TARNAME)
114114 @cp -r build-tcc.bat $(TARNAME)
115115 @cp -r i386-win32-tcc.exe $(TARNAME)
116116 @cp -r libtcc.def $(TARNAME)
win32/build-tcc.bat+20−3
@@ -1,10 +1,11 @@
11 @rem ------------------------------------------------------
2−@rem batch file to build tcc using mingw gcc or tcc itself
2+@rem batch file to build tcc using mingw, msvc or tcc itself
33 @rem ------------------------------------------------------
44
55 @echo off
66
7−set CC=gcc -Os -s -fno-strict-aliasing
7+set CC=gcc -Os -s
8+
89 set T=32
910 if %PROCESSOR_ARCHITECTURE%_==AMD64_ set T=64
1011 if %PROCESSOR_ARCHITEW6432%_==AMD64_ set T=64
@@ -16,7 +17,7 @@ goto :a0 · 5 unmodified lines
1617 :usage
1718 echo usage: build-tcc.bat [ options ... ]
1819 echo options:
19−echo -c prog use prog (gcc or tcc) to compile tcc
20+echo -c prog use prog (gcc/tcc/cl) to compile tcc
2021 echo -c "prog options" use prog with options to compile tcc
2122 echo -t 32/64 force 32/64 bit default target
2223 echo -v "version" set tcc version
@@ -24,6 +25,21 @@ echo -i dir install tcc into dir · 1 unmodified line
2425 echo -d create tcc-doc.html too (needs makeinfo)
2526 exit /B 1
2627
28+:cl
29+@echo off
30+set CMD=cl
31+:c0
32+set ARG=%1
33+set ARG=%ARG:.dll=.lib%
34+if (%1)==(-shared) set ARG=-LD
35+if (%1)==(-o) shift && set ARG=-Fe%2
36+set CMD=%CMD% %ARG%
37+shift
38+if not (%1)==() goto :c0
39+echo on
40+%CMD% -O1 -W2 -Zi -MT -GS- -nologo -link -opt:ref,icf
41+@exit /B %ERRORLEVEL%
42+
2743 :a2
2844 shift
2945 :a1
@@ -31,6 +47,7 @@ shift · 1 unmodified line
3147 :a0
3248 if not (%1)==(-c) goto :a3
3349 set CC=%~2
50+if (%2)==(cl) set CC=@call :cl
3451 goto :a2
3552 :a3
3653 if not (%1)==(-t) goto :a4
win32/include/tcc/tcc_libm.h+1−1
@@ -1,7 +1,7 @@
11 #ifndef _TCC_LIBM_H_
22 #define _TCC_LIBM_H_
33
4−#include "../include/math.h"
4+#include "../math.h"
55
66 /* TCC uses 8 bytes for double and long double, so effectively the l variants
77 * are never used. For now, they just run the normal (double) variant.
win32/tcc-win32.txt+9−6
@@ -107,23 +107,26 @@ · 106 unmodified lines
107107 Compilation from source:
108108 ------------------------
109109 * You can use the MinGW and MSYS tools available at
110−
111110 http://www.mingw.org
112111
113112 Untar the TCC archive and type in the MSYS shell:
114−
115113 ./configure [--prefix installpath]
116114 make
117115 make install
118116
119− The default install location is c:\Program Files\tcc
117+ The default install location is c:\Program Files\tcc
120118
121119 * Alternatively you can compile TCC with just GCC from MinGW using
120+ > build-tcc.bat (from the win32 directory)
121+
122+ Also MSVC can be used with the "VSTools Developer Command Prompt":
123+ > build-tcc.bat -c cl
122124
123− build-tcc.bat (from the win32 directory)
125+ or with a tcc (needs to be in a different directory)
126+ > build-tcc.bat -c some-tcc-dir\tcc.exe
124127
125− To install, copy the entire contents of the win32 directory to
126− where you want.
128+ Also you can copy/install everything into another directory:
129+ > build-tcc.bat -i <dir>
127130
128131
129132 Limitations:
win32/vs2015/PreBuild.bat+0−9
@@ -1,9 +0,0 @@
1−set /p VERSION= < %~dp0..\..\VERSION
2−
3−:config.h
4−echo> .\config.h #define TCC_VERSION "%VERSION%"
5−echo>> .\config.h #ifdef TCC_TARGET_X86_64
6−echo>> .\config.h #define CONFIG_TCC_LIBPATHS "{B}/lib/64;{B}/lib"
7−echo>> .\config.h #else
8−echo>> .\config.h #define CONFIG_TCC_LIBPATHS "{B}/lib/32;{B}/lib"
9−echo>> .\config.h #endif
win32/vs2015/libtcc.vcxproj+0−220
@@ -1,220 +0,0 @@
1−<?xml version="1.0" encoding="utf-8"?>
2−<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3− <ItemGroup Label="ProjectConfigurations">
4− <ProjectConfiguration Include="Debug|Win32">
5− <Configuration>Debug</Configuration>
6− <Platform>Win32</Platform>
7− </ProjectConfiguration>
8− <ProjectConfiguration Include="Release|Win32">
9− <Configuration>Release</Configuration>
10− <Platform>Win32</Platform>
11− </ProjectConfiguration>
12− <ProjectConfiguration Include="Debug|x64">
13− <Configuration>Debug</Configuration>
14− <Platform>x64</Platform>
15− </ProjectConfiguration>
16− <ProjectConfiguration Include="Release|x64">
17− <Configuration>Release</Configuration>
18− <Platform>x64</Platform>
19− </ProjectConfiguration>
20− </ItemGroup>
21− <PropertyGroup Label="Globals">
22− <ProjectGuid>{41F2DA74-9707-49A3-A466-157C7028BD79}</ProjectGuid>
23− <Keyword>Win32Proj</Keyword>
24− <RootNamespace>libtcc</RootNamespace>
25− <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
26− </PropertyGroup>
27− <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
29− <ConfigurationType>DynamicLibrary</ConfigurationType>
30− <UseDebugLibraries>true</UseDebugLibraries>
31− <PlatformToolset>v140</PlatformToolset>
32− <CharacterSet>MultiByte</CharacterSet>
33− </PropertyGroup>
34− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
35− <ConfigurationType>DynamicLibrary</ConfigurationType>
36− <UseDebugLibraries>false</UseDebugLibraries>
37− <PlatformToolset>v140</PlatformToolset>
38− <WholeProgramOptimization>true</WholeProgramOptimization>
39− <CharacterSet>MultiByte</CharacterSet>
40− </PropertyGroup>
41− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
42− <ConfigurationType>DynamicLibrary</ConfigurationType>
43− <UseDebugLibraries>true</UseDebugLibraries>
44− <PlatformToolset>v140</PlatformToolset>
45− <CharacterSet>MultiByte</CharacterSet>
46− </PropertyGroup>
47− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
48− <ConfigurationType>DynamicLibrary</ConfigurationType>
49− <UseDebugLibraries>false</UseDebugLibraries>
50− <PlatformToolset>v140</PlatformToolset>
51− <WholeProgramOptimization>true</WholeProgramOptimization>
52− <CharacterSet>MultiByte</CharacterSet>
53− </PropertyGroup>
54− <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
55− <ImportGroup Label="ExtensionSettings">
56− </ImportGroup>
57− <ImportGroup Label="Shared">
58− </ImportGroup>
59− <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
60− <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
61− </ImportGroup>
62− <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
63− <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
64− </ImportGroup>
65− <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
66− <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
67− </ImportGroup>
68− <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
69− <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
70− </ImportGroup>
71− <PropertyGroup Label="UserMacros" />
72− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
73− <LinkIncremental>true</LinkIncremental>
74− <IncludePath>$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
75− </PropertyGroup>
76− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
77− <LinkIncremental>true</LinkIncremental>
78− <IncludePath>$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
79− </PropertyGroup>
80− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
81− <LinkIncremental>false</LinkIncremental>
82− <IncludePath>$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
83− </PropertyGroup>
84− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
85− <LinkIncremental>false</LinkIncremental>
86− <IncludePath>$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
87− </PropertyGroup>
88− <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
89− <ClCompile>
90− <PrecompiledHeader>
91− </PrecompiledHeader>
92− <WarningLevel>Level3</WarningLevel>
93− <Optimization>Disabled</Optimization>
94− <PreprocessorDefinitions>ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_I386;WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
95− <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
96− </ClCompile>
97− <Link>
98− <SubSystem>Windows</SubSystem>
99− <GenerateDebugInformation>true</GenerateDebugInformation>
100− </Link>
101− <PostBuildEvent>
102− <Command>copy $(TargetPath) $(SolutionDir)..</Command>
103− </PostBuildEvent>
104− <PreBuildEvent>
105− <Command>$(ProjectDir)PreBuild.bat</Command>
106− </PreBuildEvent>
107− <PreBuildEvent>
108− <Message>Generate config.h</Message>
109− </PreBuildEvent>
110− </ItemDefinitionGroup>
111− <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
112− <ClCompile>
113− <PrecompiledHeader>
114− </PrecompiledHeader>
115− <WarningLevel>Level3</WarningLevel>
116− <Optimization>Disabled</Optimization>
117− <PreprocessorDefinitions>ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_X86_64;_DEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
118− <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
119− </ClCompile>
120− <Link>
121− <SubSystem>Windows</SubSystem>
122− <GenerateDebugInformation>true</GenerateDebugInformation>
123− </Link>
124− <PostBuildEvent>
125− <Command>copy $(TargetPath) $(SolutionDir)..</Command>
126− </PostBuildEvent>
127− <PreBuildEvent>
128− <Command>$(ProjectDir)PreBuild.bat</Command>
129− </PreBuildEvent>
130− <PreBuildEvent>
131− <Message>Generate config.h</Message>
132− </PreBuildEvent>
133− </ItemDefinitionGroup>
134− <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
135− <ClCompile>
136− <WarningLevel>Level3</WarningLevel>
137− <PrecompiledHeader>
138− </PrecompiledHeader>
139− <Optimization>MaxSpeed</Optimization>
140− <FunctionLevelLinking>true</FunctionLevelLinking>
141− <IntrinsicFunctions>true</IntrinsicFunctions>
142− <PreprocessorDefinitions>ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_I386;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143− </ClCompile>
144− <Link>
145− <SubSystem>Windows</SubSystem>
146− <EnableCOMDATFolding>true</EnableCOMDATFolding>
147− <OptimizeReferences>true</OptimizeReferences>
148− <GenerateDebugInformation>true</GenerateDebugInformation>
149− </Link>
150− <PostBuildEvent>
151− <Command>copy $(TargetPath) $(SolutionDir)..</Command>
152− </PostBuildEvent>
153− <PreBuildEvent>
154− <Command>$(ProjectDir)PreBuild.bat</Command>
155− </PreBuildEvent>
156− <PreBuildEvent>
157− <Message>Generate config.h</Message>
158− </PreBuildEvent>
159− </ItemDefinitionGroup>
160− <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
161− <ClCompile>
162− <WarningLevel>Level3</WarningLevel>
163− <PrecompiledHeader>
164− </PrecompiledHeader>
165− <Optimization>MaxSpeed</Optimization>
166− <FunctionLevelLinking>true</FunctionLevelLinking>
167− <IntrinsicFunctions>true</IntrinsicFunctions>
168− <PreprocessorDefinitions>ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_X86_64;NDEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
169− </ClCompile>
170− <Link>
171− <SubSystem>Windows</SubSystem>
172− <EnableCOMDATFolding>true</EnableCOMDATFolding>
173− <OptimizeReferences>true</OptimizeReferences>
174− <GenerateDebugInformation>true</GenerateDebugInformation>
175− </Link>
176− <PostBuildEvent>
177− <Command>copy $(TargetPath) $(SolutionDir)..</Command>
178− </PostBuildEvent>
179− <PreBuildEvent>
180− <Command>$(ProjectDir)PreBuild.bat</Command>
181− </PreBuildEvent>
182− <PreBuildEvent>
183− <Message>Generate config.h</Message>
184− </PreBuildEvent>
185− </ItemDefinitionGroup>
186− <ItemGroup>
187− <ClCompile Include="..\..\libtcc.c" />
188− </ItemGroup>
189− <ItemGroup>
190− <ClInclude Include="..\..\arm-gen.c" />
191− <ClInclude Include="..\..\arm64-gen.c" />
192− <ClInclude Include="..\..\c67-gen.c" />
193− <ClInclude Include="..\..\conftest.c" />
194− <ClInclude Include="..\..\i386-asm.c" />
195− <ClInclude Include="..\..\i386-gen.c" />
196− <ClInclude Include="..\..\il-gen.c" />
197− <ClInclude Include="..\..\tcc.h" />
198− <ClInclude Include="..\..\tccasm.c" />
199− <ClInclude Include="..\..\tcccoff.c" />
200− <ClInclude Include="..\..\tccelf.c" />
201− <ClInclude Include="..\..\tccgen.c" />
202− <ClInclude Include="..\..\tccpe.c" />
203− <ClInclude Include="..\..\tccpp.c" />
204− <ClInclude Include="..\..\tccrun.c" />
205− <ClInclude Include="..\..\x86_64-gen.c" />
206− <ClInclude Include="..\..\coff.h" />
207− <ClInclude Include="..\..\elf.h" />
208− <ClInclude Include="..\..\i386-asm.h" />
209− <ClInclude Include="..\..\i386-tok.h" />
210− <ClInclude Include="..\..\il-opcodes.h" />
211− <ClInclude Include="..\..\libtcc.h" />
212− <ClInclude Include="..\..\stab.h" />
213− <ClInclude Include="..\..\tcclib.h" />
214− <ClInclude Include="..\..\tcctok.h" />
215− <ClInclude Include="..\..\x86_64-asm.h" />
216− </ItemGroup>
217− <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
218− <ImportGroup Label="ExtensionTargets">
219− </ImportGroup>
220−</Project>
win32/vs2015/tcc.sln+0−41
@@ -1,41 +0,0 @@
1−
2−Microsoft Visual Studio Solution File, Format Version 12.00
3−# Visual Studio 14
4−VisualStudioVersion = 14.0.25123.0
5−MinimumVisualStudioVersion = 10.0.40219.1
6−Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcc", "tcc.vcxproj", "{6E7932A7-B123-48EB-AB39-40867AF28105}"
7− ProjectSection(ProjectDependencies) = postProject
8− {41F2DA74-9707-49A3-A466-157C7028BD79} = {41F2DA74-9707-49A3-A466-157C7028BD79}
9− EndProjectSection
10−EndProject
11−Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtcc", "libtcc.vcxproj", "{41F2DA74-9707-49A3-A466-157C7028BD79}"
12−EndProject
13−Global
14− GlobalSection(SolutionConfigurationPlatforms) = preSolution
15− Debug|x64 = Debug|x64
16− Debug|x86 = Debug|x86
17− Release|x64 = Release|x64
18− Release|x86 = Release|x86
19− EndGlobalSection
20− GlobalSection(ProjectConfigurationPlatforms) = postSolution
21− {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x64.ActiveCfg = Debug|x64
22− {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x64.Build.0 = Debug|x64
23− {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x86.ActiveCfg = Debug|Win32
24− {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x86.Build.0 = Debug|Win32
25− {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x64.ActiveCfg = Release|x64
26− {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x64.Build.0 = Release|x64
27− {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x86.ActiveCfg = Release|Win32
28− {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x86.Build.0 = Release|Win32
29− {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x64.ActiveCfg = Debug|x64
30− {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x64.Build.0 = Debug|x64
31− {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x86.ActiveCfg = Debug|Win32
32− {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x86.Build.0 = Debug|Win32
33− {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x64.ActiveCfg = Release|x64
34− {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x64.Build.0 = Release|x64
35− {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x86.ActiveCfg = Release|Win32
36− {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x86.Build.0 = Release|Win32
37− EndGlobalSection
38− GlobalSection(SolutionProperties) = preSolution
39− HideSolutionNode = FALSE
40− EndGlobalSection
41−EndGlobal
win32/vs2015/tcc.vcxproj+0−195
@@ -1,195 +0,0 @@
1−<?xml version="1.0" encoding="utf-8"?>
2−<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3− <ItemGroup Label="ProjectConfigurations">
4− <ProjectConfiguration Include="Debug|Win32">
5− <Configuration>Debug</Configuration>
6− <Platform>Win32</Platform>
7− </ProjectConfiguration>
8− <ProjectConfiguration Include="Release|Win32">
9− <Configuration>Release</Configuration>
10− <Platform>Win32</Platform>
11− </ProjectConfiguration>
12− <ProjectConfiguration Include="Debug|x64">
13− <Configuration>Debug</Configuration>
14− <Platform>x64</Platform>
15− </ProjectConfiguration>
16− <ProjectConfiguration Include="Release|x64">
17− <Configuration>Release</Configuration>
18− <Platform>x64</Platform>
19− </ProjectConfiguration>
20− </ItemGroup>
21− <PropertyGroup Label="Globals">
22− <ProjectGuid>{6E7932A7-B123-48EB-AB39-40867AF28105}</ProjectGuid>
23− <Keyword>Win32Proj</Keyword>
24− <RootNamespace>tcc</RootNamespace>
25− <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
26− </PropertyGroup>
27− <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
29− <ConfigurationType>Application</ConfigurationType>
30− <UseDebugLibraries>true</UseDebugLibraries>
31− <PlatformToolset>v140</PlatformToolset>
32− <CharacterSet>Unicode</CharacterSet>
33− </PropertyGroup>
34− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
35− <ConfigurationType>Application</ConfigurationType>
36− <UseDebugLibraries>false</UseDebugLibraries>
37− <PlatformToolset>v140</PlatformToolset>
38− <WholeProgramOptimization>true</WholeProgramOptimization>
39− <CharacterSet>Unicode</CharacterSet>
40− </PropertyGroup>
41− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
42− <ConfigurationType>Application</ConfigurationType>
43− <UseDebugLibraries>true</UseDebugLibraries>
44− <PlatformToolset>v140</PlatformToolset>
45− <CharacterSet>Unicode</CharacterSet>
46− </PropertyGroup>
47− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
48− <ConfigurationType>Application</ConfigurationType>
49− <UseDebugLibraries>false</UseDebugLibraries>
50− <PlatformToolset>v140</PlatformToolset>
51− <WholeProgramOptimization>true</WholeProgramOptimization>
52− <CharacterSet>Unicode</CharacterSet>
53− </PropertyGroup>
54− <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
55− <ImportGroup Label="ExtensionSettings">
56− </ImportGroup>
57− <ImportGroup Label="Shared">
58− </ImportGroup>
59− <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
60− <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
61− </ImportGroup>
62− <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
63− <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
64− </ImportGroup>
65− <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
66− <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
67− </ImportGroup>
68− <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
69− <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
70− </ImportGroup>
71− <PropertyGroup Label="UserMacros" />
72− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
73− <LinkIncremental>true</LinkIncremental>
74− <IncludePath>$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
75− </PropertyGroup>
76− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
77− <LinkIncremental>true</LinkIncremental>
78− <IncludePath>$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
79− </PropertyGroup>
80− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
81− <LinkIncremental>false</LinkIncremental>
82− <IncludePath>$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
83− </PropertyGroup>
84− <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
85− <LinkIncremental>false</LinkIncremental>
86− <IncludePath>$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
87− </PropertyGroup>
88− <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
89− <ClCompile>
90− <PrecompiledHeader>
91− </PrecompiledHeader>
92− <WarningLevel>Level3</WarningLevel>
93− <Optimization>Disabled</Optimization>
94− <PreprocessorDefinitions>TCC_TARGET_PE;TCC_TARGET_I386;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
95− <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
96− </ClCompile>
97− <Link>
98− <SubSystem>Console</SubSystem>
99− <GenerateDebugInformation>true</GenerateDebugInformation>
100− <AdditionalLibraryDirectories>Debug</AdditionalLibraryDirectories>
101− <AdditionalDependencies>libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
102− </Link>
103− <PostBuildEvent>
104− <Command>copy $(TargetPath) $(SolutionDir)..</Command>
105− </PostBuildEvent>
106− <PreBuildEvent>
107− <Command>$(ProjectDir)PreBuild.bat</Command>
108− <Message>Generate config.h</Message>
109− </PreBuildEvent>
110− </ItemDefinitionGroup>
111− <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
112− <ClCompile>
113− <PrecompiledHeader>
114− </PrecompiledHeader>
115− <WarningLevel>Level3</WarningLevel>
116− <Optimization>Disabled</Optimization>
117− <PreprocessorDefinitions>TCC_TARGET_PE;TCC_TARGET_X86_64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
118− <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
119− </ClCompile>
120− <Link>
121− <SubSystem>Console</SubSystem>
122− <GenerateDebugInformation>true</GenerateDebugInformation>
123− <AdditionalDependencies>libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
124− <AdditionalLibraryDirectories>x64\Debug</AdditionalLibraryDirectories>
125− </Link>
126− <PostBuildEvent>
127− <Command>copy $(TargetPath) $(SolutionDir)..</Command>
128− </PostBuildEvent>
129− <PreBuildEvent>
130− <Command>$(ProjectDir)PreBuild.bat</Command>
131− <Message>Generate config.h</Message>
132− </PreBuildEvent>
133− </ItemDefinitionGroup>
134− <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
135− <ClCompile>
136− <WarningLevel>Level3</WarningLevel>
137− <PrecompiledHeader>
138− </PrecompiledHeader>
139− <Optimization>MaxSpeed</Optimization>
140− <FunctionLevelLinking>true</FunctionLevelLinking>
141− <IntrinsicFunctions>true</IntrinsicFunctions>
142− <PreprocessorDefinitions>TCC_TARGET_PE;TCC_TARGET_I386;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143− </ClCompile>
144− <Link>
145− <SubSystem>Console</SubSystem>
146− <EnableCOMDATFolding>true</EnableCOMDATFolding>
147− <OptimizeReferences>true</OptimizeReferences>
148− <GenerateDebugInformation>true</GenerateDebugInformation>
149− <AdditionalLibraryDirectories>Release</AdditionalLibraryDirectories>
150− <AdditionalDependencies>libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
151− </Link>
152− <PostBuildEvent>
153− <Command>copy $(TargetPath) $(SolutionDir)..</Command>
154− </PostBuildEvent>
155− <PreBuildEvent>
156− <Command>$(ProjectDir)PreBuild.bat</Command>
157− <Message>Generate config.h</Message>
158− </PreBuildEvent>
159− </ItemDefinitionGroup>
160− <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
161− <ClCompile>
162− <WarningLevel>Level3</WarningLevel>
163− <PrecompiledHeader>
164− </PrecompiledHeader>
165− <Optimization>MaxSpeed</Optimization>
166− <FunctionLevelLinking>true</FunctionLevelLinking>
167− <IntrinsicFunctions>true</IntrinsicFunctions>
168− <PreprocessorDefinitions>TCC_TARGET_PE;TCC_TARGET_X86_64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
169− </ClCompile>
170− <Link>
171− <SubSystem>Console</SubSystem>
172− <EnableCOMDATFolding>true</EnableCOMDATFolding>
173− <OptimizeReferences>true</OptimizeReferences>
174− <GenerateDebugInformation>true</GenerateDebugInformation>
175− <AdditionalDependencies>libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
176− <AdditionalLibraryDirectories>x64\Release</AdditionalLibraryDirectories>
177− </Link>
178− <PostBuildEvent>
179− <Command>copy $(TargetPath) $(SolutionDir)..</Command>
180− </PostBuildEvent>
181− <PreBuildEvent>
182− <Command>$(ProjectDir)PreBuild.bat</Command>
183− <Message>Generate config.h</Message>
184− </PreBuildEvent>
185− </ItemDefinitionGroup>
186− <ItemGroup>
187− <ClCompile Include="..\..\tcc.c" />
188− </ItemGroup>
189− <ItemGroup>
190− <ClInclude Include="..\..\tcc.h" />
191− </ItemGroup>
192− <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
193− <ImportGroup Label="ExtensionTargets">
194− </ImportGroup>
195−</Project>

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t