aboutsummaryrefslogtreecommitdiff
path: root/win32
Commit message (Collapse)AuthorAgeFilesLines
* misc. fixesgrischka2014-01-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | - 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: cleanup "imports per ordinal"grischka2014-01-062-109/+0
| | | | | | | - tccpe.c: avoid conflict with imp_sym->st_value, cleanup - _parseLibs.bat, _tcc.bat: no instructions for usage, removed. from commit 642b6d0f50c6b6a842c9239a102fe34d5619e931
* Fix "Add support for struct > 4B returned via registers"grischka2013-12-161-0/+2
| | | | | | | | | | | - 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
* Add the possibility to use noname functions by ordinalYX Hao2013-09-193-1/+117
| | | | | | | | | | | | | | | | | | | | | 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>
* win32: fix libtcc supportgrischka2013-09-101-6/+0
| | | | | | | | | | | | | | 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
* i386-gen: preserve fp control word in gen_cvt_ftoigrischka2013-08-284-7/+19
| | | | | | | | | | | | | | | | | | | | | | | - 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
* add version number to manpageUrs Janssen2013-02-178-18/+18
| | | | | | | 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)
* libtcc: new LIBTCCAPI tcc_set_options(TCCState*, const char*str)grischka2013-02-123-39/+42
| | | | | | | | | | | | | | | | | | | 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
* tcc -vv/--print-search-dirs: print more infogrischka2013-02-102-35/+30
| | | | | | | | | | | | | | 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
* tcc.h: declare CValue.tab[LDOUBLE_SIZE/4]grischka2013-02-081-29/+26
| | | | | | | | 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.
* win32: wincrt1.c: include stdlib.h for exit()grischka2013-02-041-0/+1
|
* win32: _mingw.h: do not undef NULLgrischka2013-01-241-1/+0
| | | | | | | | | 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.
* Revert mistake in "win32: malloc.h: fix win32 ... _STATIC_ASSERT"grischka2013-01-142-69/+0
| | | | | | | from commit fc574f14984d11f1ead50560d1bdc5ae0eaf6d8d. The files from include are copied to win32/include with make install or build-tcc.bat.
* win32: malloc.h: fix win32 tcc-tcc complication by correcting ↵Roy2012-12-313-1/+70
| | | | | | _STATIC_ASSERT, ideas from mingw-w64 changeset 4293 stdarg.h, stddef.h: _mingw.h needs them
* win32: build-tcc.bat: get rid of hardcoded VERSION stringgrischka2012-12-202-11/+7
| | | | | | | Also: - put libtcc.def into libtcc dir - remove ar references - remove libtcc_test from build
* win32: tcc.exe uses libtcc.dllgrischka2012-04-182-5/+2
|
* tcc.c: fix previous commit "Use CString to concat linker options"grischka2012-04-181-1/+1
| | | | | | | | | - 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
* Re-enable "Use CString to concat linker options"Gabriel Corneanu2012-04-181-1/+1
| | | | | | | This reverts commit 16202e054f0385499ec16463b87e23c97dc02328. Changed win32 build to use ONE_SOURCE just like libtcc.dll Therefore CString can be used again...
* libtcc: minor adjustmentsgrischka2011-08-111-3/+7
| | | | | | | | | | | | | | | | | - 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.
* dll build + small adjustmentsGabriel Corneanu2011-08-101-4/+5
|
* tccpe: cleanup ELFW() macros etc.grischka2011-07-141-1/+11
|
* tccrun: win64: add unwind function table for dynamic codegrischka2011-07-142-8/+2
| | | | | This works only when tcc.exe is compiled using MSC. MinGW does something in the startup code that defeats it.
* make: create native tcc from separate objectsgrischka2011-07-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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.
* win32/include: enable _timezone etc variables.grischka2011-07-113-15/+13
| | | | | | | | | 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
* tccpe: support leading underscore for symbolsgrischka2011-02-131-0/+2
| | | | | | | | | 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
* tiny_libmaker: strip leading directory to avoid buffer overrungrischka2010-12-041-3/+13
| | | | | | The arhdr.ar_name has 16 bytes. Long object names esp. with leading directory were causing a buffer overrun which was detected by glibc.
* make: new lib/Makefile for libtcc1.a on more platformsgrischka2010-12-041-20/+23
| | | | | | win32/64 cross-compilers now build libtcc1.a and install it together with the windows headers in a 'win32' sub-directory of TCCDIR.
* build: remove #include "config.h" from target dependent filesgrischka2010-11-264-21/+20
| | | | This is to make cross build of libtcc1.a easier.
* win32: register SEH in startup code (i386 only)grischka2010-10-194-2/+126
| | | | Needed to handle signal() etc. with msvcrt
* Explicit license in tiny_libmaker.cThomas Preud'homme2010-10-071-2/+14
| | | | | | 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
* win32: sys/timeb.h use _ftime instead of _ftime32grischka2010-04-121-1/+2
|
* tinylibmaker: On error situation tempfile was not removedunknown2010-04-031-0/+3
|
* win32: adjust for mingw32 winapi packagesgrischka2010-01-261-0/+11
| | | | | | 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.
* win64: defined size_t and ptrdiff_t to unsigned long longgrischka2010-01-141-18/+17
|
* win32: cleanup includegrischka2010-01-148-485/+57
|
* tccpe: improve dllimport/export and use for tcc_add_symbolgrischka2010-01-141-19/+21
|
* win32: readme: add libtcc_test examplegrischka2010-01-141-6/+4
|
* win32: add size_t to _mingw.hgrischka2009-12-201-0/+9
|
* win64: add tiny unwind data for setjmp/longjmpgrischka2009-12-202-4/+12
| | | | | | | | | 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.
* win32: enable bounds checker & exception handlergrischka2009-12-191-2/+14
| | | | exception handler borrowed from k1w1. Thanks.
* integrate x86_64-asm.c into i386-asm.cgrischka2009-12-191-15/+1
| | | | | Also, disable 16bit support for now as it causes bugs in 32bit mode. #define I386_ASM_16 if you want it.
* win64: adjust for two args with setjmp(buf,ctx)grischka2009-12-192-0/+10
|
* win32: remove #define alloca from mingw headersgrischka2009-12-011-1/+1
|
* win32: explain usage of mingw w32api packagegrischka2009-11-301-1/+2
|
* win64: Use tcc's own assemblergrischka2009-11-211-5/+5
| | | | Now that we have it thanks to Mr. Féret
* win64: fix batgrischka2009-08-241-11/+13
|
* tccpe: load dll on the flygrischka2009-07-181-88/+95
|
* win32: reformat examples, crt etcgrischka2009-07-184-134/+148
|
* x86-64: chkstk, allocagrischka2009-07-181-21/+53
|
* win64: add x64 target to build-tcc.batgrischka2009-07-181-19/+47
|