| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- tccgen: error out for cast to void, as in
void foo(void) { return 1; }
This avoids an assertion failure in x86_64-gen.c, also.
also fix tests2/03_struct.c accordingly
- Error: "memory full" - be more specific
- Makefiles: remove circular dependencies, lookup tcctest.c from VPATH
- tcc.h: cleanup lib, include, crt and libgcc search paths"
avoid duplication or trailing slashes with no CONFIG_MULTIARCHDIR
(as from 9382d6f1a0e2d0104a82ed805207d9e742c6b068)
- tcc.h: remove ";{B}" from PE search path
in ce5e12c2f950052d8109b6b7a56d900547705c08 James Lyon wrote:
"... I'm not sure this is the right way to fix this problem."
And the answer is: No, please. (copying libtcc1.a for tests instead)
- win32/build_tcc.bat: do not move away a versioned file
|
| |
|
|
|
|
|
| |
- tccpe.c: avoid conflict with imp_sym->st_value, cleanup
- _parseLibs.bat, _tcc.bat: no instructions for usage, removed.
from commit 642b6d0f50c6b6a842c9239a102fe34d5619e931
|
| |
|
|
|
|
|
|
|
|
|
| |
- avoid assumption "ret_align == register_size" which is
false for non-arm targets
- rename symbol "sret" to more descriptive "ret_nregs"
This fixes commit dcec8673f21da86ae3dcf1ca3e9498127715b795
Also:
- remove multiple definitions in win32/include/math.h
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tcc.c:
process.h:177:20: note: expected 'char * const*' but argument is of type 'char const*const*'
tccpe.c:
Add the possibility to use noname functions by ordinal.
use def file: "AliasName @n"
build-tcc.bat:
1. Enable 32 bits mode on 64 bits OS.
2. build doc.
_parseLibs.bat:
Convenient to use "*.def + *.c" instead of *.a, just use -l*
_tcc.bat:
a practice of _parseLibs.bat
Signed-off-by: YX Hao <lifenjoiner@163.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
For "tcc -run file.c", I was trying to initialize the FP control
in a function in libtcc1.a (_runmain) before calling main.
Unfortunately that turned out to cause problems with for example
libtcc_test since such usage doesn't necessarily define a 'main'
function.
So for tcc -run we're back to relying on the FP control word
that is set in the startup code of tcc.exe rsp. libtcc.dll.
This fixes part of commit 73faaea227a53e365dd75f1dba7a5071c7b5e541
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use runtime function for conversion
- Also initialize fp with tcc -run on windows
This fixes a bug where
double x = 1.0;
double y = 1.0000000000000001;
double z = x < y ? 0 : sqrt (x*x - y*y);
caused a bad sqrt because rounding precision for the x < y comparison
was different to the one used within the sqrt function.
This also fixes a bug where
printf("%d, %d", (int)pow(10, 2), (int)pow(10, 2));
would print
100, 99
Unrelated:
win32: document relative include & lib lookup
win32: normalize_slashes: do not mirror silly gcc behavior
This reverts part of commit 8a81f9e1036637e21a47e14fb56bf64133546890
winapi: add missing WINAPI decl. for some functions
|
| |
|
|
|
|
|
| |
avoid c++/c99 style comments in preprocessor directives
avoid leadings whitespaces in preprocessor directives
mention implemented variable length arrays in documentation
fixed ambiguous option in texi2html call (Austin English)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces -> use instead:
-----------------------------------
- tcc_set_linker -> tcc_set_options(s, "-Wl,...");
- tcc_set_warning -> tcc_set_options(s, "-W...");
- tcc_enable_debug -> tcc_set_options(s, "-g");
parse_args is moved to libtcc.c (now tcc_parse_args).
Also some cleanups:
- reorder TCCState members
- add some comments here and there
- do not use argv's directly, make string copies
- use const char* in tcc_set_linker
- tccpe: use fd instead of fp
tested with -D MEM_DEBUG: 0 bytes left
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
tests/Makefile:
- print-search-dirs when 'hello' fails
- split off hello-run
win32/include/_mingw.h:
- fix for compatibility with mingw headers
(While our headers in win32 are from mingw-64 and don't have
the problem)
tiny_libmaker:
- don't use "dangerous" mktemp
|
| |
|
|
|
|
|
|
| |
Should fix some warnings wrt. access out of array bounds.
tccelf.c: fix "static function unused" warning
x86_64-gen.c: fix "ctype.ref uninitialzed" warning and cleanup
tcc-win32.txt: remove obsolete limitation notes.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Not wise if stddef.h was already included. This is related to commit
3aa26a794e24a298493a2bc9d70fbd9aebf6437a
Instead hack stddef.h to have identical definition and thus
avoid the issue mentionned there.
|
| |
|
|
|
|
|
| |
from commit fc574f14984d11f1ead50560d1bdc5ae0eaf6d8d.
The files from include are copied to win32/include with make
install or build-tcc.bat.
|
| |
|
|
|
|
| |
_STATIC_ASSERT, ideas from mingw-w64 changeset 4293
stdarg.h, stddef.h: _mingw.h needs them
|
| |
|
|
|
|
|
| |
Also:
- put libtcc.def into libtcc dir
- remove ar references
- remove libtcc_test from build
|
| | |
|
| |
|
|
|
|
|
|
|
| |
- remove redunant else branch
- zero-terminate linker_arg
- declare cstr_xxx as PUB_FUNC
(which are functions used in tcc.c but not in the libtcc API.
Useful for a tcc(.exe) that uses the libtcc.(so/dll))
- while at it, export PUB_FUNCs from dll
|
| |
|
|
|
|
|
| |
This reverts commit 16202e054f0385499ec16463b87e23c97dc02328.
Changed win32 build to use ONE_SOURCE just like libtcc.dll
Therefore CString can be used again...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- use {B} to substitute tcc_lih_path (instead of \b)
- expand CONFIG_TCC_CRTPREFIX in CONFIG_TCC_LIBPATHS
which fixes duplicate CONFIG_SYSROOT.
- put default CONFIG_SYSROOT ("") into tcc.h
- remove hack from commit db6fcce78f4d8ea25036dd6643e9fa83d8e52e5a
because $(tccdir)/include is already in sysincludes
- configure: error out for unrecognized options.
- win32/build-tcc.bat: put libtcc into base dir where it will
find lib/include automatically, and build libtcc_test example.
|
| | |
|
| | |
|
| |
|
|
|
| |
This works only when tcc.exe is compiled using MSC. MinGW does
something in the startup code that defeats it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was already possible using
make NOTALLINONE=1
and is now the default.
To build as previously from one big source, use
make ONE_SOURCE=1
Cross compilers are still build from one source because using
separate objects requires separate build directories one per
platform which currently is not (yet) supported by the makefile.
We could probably use gnu-makeish target variables like
$(I386_CROSS): OUTDIR=build/i386
$(X64_CROSS): OUTDIR=build/x86-64
and so on ...
Also NEED_FLOAT_TYPES for arm-gen is removed. It was about
variables that are referenced from outside (libtcc, tccgen).
We could declare them in tcc.h (as with reg_classes) or have
them twice in arm-gen.c. I chose option 2.
|
| |
|
|
|
|
|
|
|
| |
which live in msvcrt.dll and need __declspec(import) which
works by now.
Also:
- _mingw.h: conditionally define WIN32_LEAN_AND_MEAN
- malloc.h: don't undef alloca
|
| |
|
|
|
|
|
|
|
| |
To make this the default, enable this line in libtcc.c:tcc_new:
#if defined(TCC_TARGET_PE) && 0
s->leading_underscore = 1;
and then recompile tcc and also libtcc1.a
|
| |
|
|
|
|
| |
The arhdr.ar_name has 16 bytes. Long object names esp. with
leading directory were causing a buffer overrun which was
detected by glibc.
|
| |
|
|
|
|
| |
win32/64 cross-compilers now build libtcc1.a and install it
together with the windows headers in a 'win32' sub-directory
of TCCDIR.
|
| |
|
|
| |
This is to make cross build of libtcc1.a easier.
|
| |
|
|
| |
Needed to handle signal() etc. with msvcrt
|
| |
|
|
|
|
| |
Explicit the license in tiny_libmaker.c to LGPLv2. Confirmation of the
license of this file can be found at
http://lists.nongnu.org/archive/html/tinycc-devel/2010-07/msg00004.html
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Note: the files in tcc/win32/include/winapi are now from the
mingw-w64 project, however with this fix using mingw32 winapi
should still work.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This enables native unwind semantics with longjmp on
win64 by putting an entry into the .pdata section for
each compiled fuction.
Also, the function now use a fixed stack and store arguments
into X(%rsp) rather than using push.
|
| |
|
|
| |
exception handler borrowed from k1w1. Thanks.
|
| |
|
|
|
| |
Also, disable 16bit support for now as it causes bugs
in 32bit mode. #define I386_ASM_16 if you want it.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Now that we have it thanks to Mr. Féret
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|