aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tccpp: allow "0x1e+1" in asmgrischka2016-10-011-9/+13
|
* tccpp: token ## pasting: preserve parts if pasting failsgrischka2016-10-011-10/+12
| | | | | | | | | for example #define LBL(name) _ ## name ## : LBL(main) will give two tokens '_main' and ':' and the warning
* Revert "-fnormalize-inc-dirs"grischka2016-10-014-100/+1
| | | | | | | Too much code. gcc 3.x doesn't have that either. This reverts commit 41785a0bf9d505a3647a10ddc330417f52fd4528. This reverts commit 21665f433890e2038626f0b3123b189a62a67dc9.
* tcc -E: add one space in cases: tiny solutiongrischka2016-10-013-54/+26
| | | | | | replaces f5f82abc99424c4ece836000934fcf57a867c635 Also: fix tcc flags in Makefile, fix tcc -E
* build: restore out-of-tree supportgrischka2016-10-016-48/+58
|
* build: revert Makefiles to 0.9.26 state (mostly)grischka2016-10-0110-579/+379
| | | | | | | | | | | | Except - that libtcc1.a is now installed in subdirs i386/ etc. - the support for arm and arm64 - some of the "Darwin" fixes - tests are mosly unchanged Also - removed the "legacy links for cross compilers" (was total mess) - removed "out-of-tree" build support (was broken anyway)
* test/pp: cleanupgrischka2016-10-016-74/+20
|
* libtcc: reimplement option -Wl,[-no]-whöle-archivegrischka2016-10-015-108/+114
| | | | - taking advantage of previous commit "incremental -Wl parsing"
* libtcc: -Wl,... incremental parsinggrischka2016-10-013-38/+31
| | | | parse -Wl linker options immediately
* Revert "output all sections if we produce an executable file"grischka2016-10-013-14/+1
| | | | | | | | | -- Not a fix This reverts commit 089ce6235c99638ad4542a57af4d09e2be0efc88. Revert "handle a -s option by executing sstrip/strip program" -- related, not a fix. This reverts commit 5cd4393a542ef4c64df7dcbb3fbe3a629666239d.
* Revert part of "fix installation amd bcheck for Windows"grischka2016-10-018-92/+58
| | | | | | | tccelf.c : force linking bcheck by adding elf symbol __bound_init bcheck.c : use (size_t)1 for x86_64 Fixes 7e7e6148fdb4adbda936f80b5d4ac3d738908d95
* libtcc: filetype cleanupgrischka2016-10-015-55/+58
| | | | - does not change signature of tcc_add_file
* Remove misc. filesgrischka2016-10-0135-6966/+9
| | | | | | | | | | | | - from win32/include/winapi: various .h The winapi header set cannot be complete no matter what. So lets have just the minimal set necessary to compile the examples. - remove CMake support (hard to keep up to date) - some other files Also, drop useless changes in win32/lib/(win)crt1.c
* tccpp: cleanupgrischka2016-10-015-184/+169
| | | | | | | | | | | | | | | | - "utf8 in identifiers" from 936819a1b90f2618bb3f86730189cf2895948ba0 - CValue: remove member str.data_allocated - make tiny allocator private to tccpp - allocate macro_stack objects on heap because otherwise it could crash after error/setjmp in preprocess_delete():end_macro() - mov "TinyAlloc" defs to tccpp.c - define_push: take int* str again
* libtcc: cleanup @listfilegrischka2016-10-015-170/+141
| | | | | | | | | Also: - allow more than one item per line - respect "quoted items" and escaped quotes \" (also for LIBTCCAPI tcc_setoptions) - cleanup some copy & paste
* libtcc: cleanup -x<filetype> switch codegrischka2016-10-014-39/+34
| | | | | Abusing filename[0] as type is just too much of a hack. -- From 05364072042ff37904a7b0b14cdd85a1ea1ca11d
* Revert "ability to compile multiple *.c files with -c switch"grischka2016-10-012-48/+24
| | | | | | | copy & paste coding, twisted control flow This reverts commit a13f183e4c2c4b4d1d40e142b57a4298672dfd2c. Also, set linker args for DLLs also.
* tccpp: #pragma once: make it workgrischka2016-10-012-37/+25
| | | | | | | | | | | after several "fixes" and "improvements" b3782c3cf5e66f74207303c381a305daabccdb12 5fb57bead41cd3a84f0aa3f98d00b5fe5de25a08 feature did not work at all - Use 'once' flag, not 'ifndef_macro' - Ignore filename letter case on _WIN32 - Increment global pp_once for each compilation
* tccpp: restore -D symbols for multiple sourcesgrischka2016-10-012-22/+18
| | | | | | | | | | | | | | | ... also for built-in defines The case: $ tcc -D FOO a.c b.c with // a.c #undef FOO // b.c #ifndef FOO # error -D FOO has been lost #endif
* Revert "--whole-archive support"grischka2016-10-016-43/+3
| | | | | | | | | | | | - would parse linker args in two different places - would mess up "tcc -v ..." output: tcc -v test.c -> test.c +> test.c - would use function "tcc_load_alacarte()" to do the contrary of what its name suggests. This reverts commit 19a169ceb896f78205bc23b847938c58f14d1dda.
* gtst_addr(): short conditional jumps (i386, x86_64)Pavlas, Zdenek2016-09-304-3/+34
|
* switch: collect case ranges first, then generate codePavlas, Zdenek2016-09-301-49/+65
| | | | | Collect cases first, then emit lookup code. Elliminates jumps to implement pass-through and jumps to link cases.
* Prevent tail spin crash when option -pthread is used.Jean-Claude Beaudoin2016-09-291-2/+4
|
* Use etags to produce target TAGS.Jean-Claude Beaudoin2016-09-291-1/+1
|
* Rein in unintended external functions on Windows.Jean-Claude Beaudoin2016-09-274-5/+7
|
* More properly propagate ONE_SOURCE.Jean-Claude Beaudoin2016-09-271-1/+8
|
* pstrcpy looks to be needed by Windows win32/win64 builds. Reverted as ↵Christian Jullien2016-09-262-2/+2
| | | | PUB_FUNC to allow tcc.exe build again.
* Merge branch 'mob' of git://repo.or.cz/tinycc into mypatchChristian Jullien2016-09-265-20/+20
|\ | | | | | | Add Visual Studio processor identification
| * Rein in unintended external functions.Jean-Claude Beaudoin2016-09-255-20/+20
| |
* | Add Microsoft processor identificationChristian Jullien2016-09-261-0/+6
|/
* Fix test for __*LP*__ predefined macrosChristian Jullien2016-09-251-11/+11
|
* Improve __*LP*__ predefined macrosChristian Jullien2016-09-251-2/+9
|
* Add test for __*LP*__ predefined macrosChristian Jullien2016-09-252-0/+39
|
* x86_64/elf: only variadic calls need raxPavlas, Zdenek2016-08-171-1/+2
|
* Remove vestiges of earlier type mergerDavid Mertens2016-08-161-4/+1
|
* tccgen: return: avoid jmp to retsym if possiblePavlas, Zdenek2016-08-111-1/+5
| | | | | When 'return' is the last statement of the top-level block (very common and often recommended case) jump is not needed.
* Avoid conflicting definition for va_list on 64-bit MacsDavid Mertens2016-08-041-0/+3
|
* win64: fix va_arggrischka2016-07-105-5/+12
| | | | | | | | | | | fixes 5c35ba66c5ade4713bbd9c005e66889f6d7db293 Implementation was consistent within tcc but incompatible with the ABI (for example library functions vprintf etc) Also: - tccpp.c/get_tok_str() : avoid "unknown format "%llu" warning - x86_64_gen.c/gen_vla_alloc() : fix vstack leak
* fix typo in -Wl,-rpath documentationVincent Lefevre2016-07-051-1/+1
| | | | Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
* tiny_libmaker: fix a commentAvi Halachmi (:avih)2016-06-191-1/+1
|
* win32: _mingw.h: add definition for _TRUNCATE from newer _mingw.hAvi Halachmi (:avih)2016-06-191-0/+4
|
* win32: malloc.h: use alloca instead of (missing) _allocaAvi Halachmi (:avih)2016-06-191-1/+7
| | | | | | _alloca is not part of msvcrt (and therefore not found if used), and tcc has an internal implementation for alloca for x86[_64] since d778bde7 - initally as _alloca and later changed to alloca. Use it instead.
* win32: wchar.h: don't redifine WCHAR_MIN[/MAX] (after stdint.h)Avi Halachmi (:avih)2016-06-191-0/+2
|
* tiny_libmaker: more robust arguments interpretationAvi Halachmi (:avih)2016-06-191-34/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Syntax is now much closer to gnu ar, but still supports whatever was supported before, with the following exceptions (which gnu ar has too): - lib is now mandatory (was optional and defaulted to ar_test.a before). - Path cannot start with '-' (but ./-myfile.o is OK). - Unlike gnu ar, modes are still optional (as before). - Now supports also (like gnu ar): - First argument as options doesn't have to start with '-', later options do. - Now supports mode v (verbose) with same output format as gnu ar. - Any names for lib/objs (were limited to .a/.o - broke cmake on windows). - Now explicitly fail on options which would be destructive for the user. - Now doesn't get confused by options between file arguments. - Still ignores other unknown options - as before. - Now doesn't read out-of-bounds if an option is one char. - As a result, cmake for windows can now use tiny_libmaker as ar, and configure can also detect tiny_libmaker as a valid ar (both couldn't before). Ignoring all options could previously cause to misinterpret the mode in a destructive way, e.g. if the user wanted to do something with an existing archive (such as p - print, or x - extract, etc), then it would instead just delete (re-create) the archive. Modes which can be destructive if ignored now explicitly fail. These include [habdioptxN]. Note that 'h' can be ignored, but this way we also implicitly print the usage for -h/--help. The .a/.o name limitations previously resulted in complete failure on some cases, such as cmake on windows which uses <filename>.obj and <libname>.lib . Fixed: e.g. 'tiny_libmaker r x.a x.o' was reading out of bounds [-1] for 'r'.
* tccgen: gen_assign_cast(): cannot cast struct to scalargrischka2016-05-251-0/+3
| | | | | | | | | | | | | | | The case below previously was causing an assertion failure in the target specific generator. It probably is not incorrect not to allow this even if gcc does. struct S { long b; }; void f(struct S *x) { struct S y[1] = { *x }; }
* Redo "fix line number in macro redefined message"grischka2016-05-252-6/+3
| | | | | | Smaller change to fix more cases This reverts commit 0f36f60faa05da7e250a4b4eebd4b534e8a2b537.
* Allow to perform tests from the custom build dir:seyko2016-05-201-15/+8
| | | | | | | | mkdir build; cd build ../configure --prefix=./package make make test make install
* [avih] a custom build dir fix for lib/Makefileseyko2016-05-201-4/+4
| | | | | | | | | | | mkdir build; cd build ../configure && make ../../lib/libtcc1.c:31: error: include file 'stddef.h' not found Author: Avi Halachmi Date: Sat Nov 14 18:40:36 2015 +0200 When building from the root tcc dir, $TOP and $top_srcdir are the same, but with a custom build dir, we need top_srcdir
* fix a mingw64 build on Linux with --enable-tcc64-mingwseyko2016-05-203-4/+16
| | | | | * define CONFIG_WIN64=yes when ARCH=x86-64 (not CONFIG_WIN32=yes) * CONFIG_WIN64 now use a windows install part (not a Linux one)
* make and install tiny_libmaker on all platformsseyko2016-05-201-4/+2
| | | | not only on Windows/Darwin.