aboutsummaryrefslogtreecommitdiff
path: root/win32/lib
Commit message (Collapse)AuthorAgeFilesLines
* various stuffgrischka2017-10-112-62/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | win32/Makefile ("for cygwin") removed - On cygwin, the normal ./configure && make can be used with either cygwin's "GCC for Win32 Toolchain" ./configure --cross-prefix=i686-w64-mingw32- or with an existing tcc: ./configure --cc=<old-tccdir>/tcc.exe tcctest.c: - exclude test_high_clobbers() on _WIN64 (does not work) tests2/95_bitfield.c: - use 'signed char' for ARM (where default 'char' is unsigned) tests: - remove -I "expr" diff option to allow tests with busybox-diff. libtcc.c, tcc.c: - removed -iwithprefix option. It is supposed to be combined with -iprefix which we don't have either. tccgen.c: - fix assignments and return of 'void', as in void f() { void *p, *q; *p = *q: return *p; } This appears to be allowed but should do nothing. tcc.h, libtcc.c, tccpp.c: - Revert "Introduce VIP sysinclude paths which are always searched first" This reverts commit 1d5e386b0a78393ac6b670c209a185849ec798a1. The patch was giving tcc's system includes priority over -I which is not how it should be. tccelf.c: - add DT_TEXTREL tag only if text relocations are actually used (which is likely not the case on x86_64) - prepare_dynamic_rel(): avoid relocation of unresolved (weak) symbols tccrun.c: - for HAVE_SELINUX, use two mappings to the same (real) file. (it was so once except the RX mapping wasn't used at all). tccpe.c: - fix relocation constant used for x86_64 (by Andrei E. Warentin) - #ifndef _WIN32 do "chmod 755 ..." to get runnable exes on cygwin. tccasm.c: - keep forward asm labels static, otherwise they will endup in dynsym eventually. configure, Makefile: - mingw32: respect ./configure options --bindir --docdir --libdir - allow overriding tcc when building libtcc1.a and libtcc.def with make XTCC=<tcc program to use> - use $(wildcard ...) for install to allow installing just a cross compiler for example make cross-arm make install - use name <target>-libtcc1.a build-tcc.bat: - add options: -clean, -b bindir
* Win: crt, initialize global __argc, __targv and _tenviron of msvcrtYX Hao2017-10-102-41/+34
| | | | | _tenviron: as far as possible, not in ASC '-run' mode. __argc and __targv are shortcuts for _tWinMain, when you want to use program parameters.
* tccgen: nodata_wanted fix, default ONE_SOURCE, etc...grischka2017-07-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | tccgen.c: doubles need to be aligned, on ARM. The section_reserve() in init_putv does not do that. -D ONE_SOURCE: is now the default and not longer needed. Also, tcc.h now sets the default native target. These both make compiling tcc simple as "gcc tcc.c -o tcc -ldl" again. arm-asm.c: enable pseudo asm also for inline asm tests/tests2/Makefile: disable bitfield tests except on windows and x86_64 and don't generate-always tcc.c: fix a loop with -dt on errors configure: print compiler version (as recognized) tccpp.c: actually define symbols for tcc -dt clear static variables (needed for -dt or libtcc usage) 96_nodata_wanted.c: use __label__ instead of asm lib/files: use native symbols (__i386__ etc.) instead of TCC_TARGET_...
* tcc: re-enable correct option -r supportgrischka2017-02-203-1/+10
| | | | | | | | | | | | | | | Forgot about it. It allows to compile several sources (and other .o's) to one single .o file; tcc -r -o all.o f1.c f2.c f3.S o4.o ... Also: - option -fold-struct-init-code removed, no effect anymore - (tcc_)set_environment() moved to tcc.c - win32/lib/(win)crt1 minor fix & add dependency - debug line output for asm (tcc -c -g xxx.S) enabled - configure/Makefiles: x86-64 -> x86_64 changes - README: cleanup
* win32: adjust new unicode supportgrischka2017-02-184-21/+29
| | | | | | | | | | | | | | | | | | | - lib/Makefile: add (win)crt1_w.o - crt1.c/_runtmain: return to tcc & only use for UNICODE (because it might be not 100% reliable with for example wildcards (tcc *.c -run ...) - tccrun.c/tccpe.c: load -run startup_code only if called from tcc_run(). Otherwise main may not be defined. See libtcc_test.c - tests2/Makefile: pass extra options in FLAGS to allow overriding TCC Also: - tccpe.c: support weak attribute. (I first tried to solve the problem above by using it but then didn't)
* Add support for Unicode entries 'wmain' and 'wWinMain' on WindowsYX Hao2017-02-172-22/+86
| | | | | | '-run' suported. argvs are converted. But don't use compliled Unicode CLI exe-file to get inputs interactively in other codepage! Please add other compliling supports than 'build-tcc.bat' (Who is good at them).
* tccrun/win64: cleanup runtime function tablegrischka2016-10-191-0/+1
| | | | | | | | | | | | | | - call RtlDeleteFunctionTable (important for multiple compilations) - the RUNTIME_FUNCTION* is now at the beginning of the runtime memory. Therefor when tcc_relocate is called with user memory, this should be done manually before it is free'd: RtlDeleteFunctionTable(*(void**)user_mem); [ free(user_mem); ] - x86_64-gen.c: expand char/short return values to int
* Remove misc. filesgrischka2016-10-012-49/+8
| | | | | | | | | | | | - 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
* win32: Add missing header files for nginx compilationseyko2016-04-131-0/+1
| | | | | | | | | From: Vlad Vissoultchev Date: Tue, 12 Apr 2016 21:02:43 +0300 Subject: win32: Add missing header files for nginx compilation The new ones are hoisted from mingw-w64 as most other headers under `win32/include/winapi`
* Add x64 SEH decls. Add exports to kernel32.defVlad Vissoultchev2016-03-131-0/+3
|
* correct a DllMain() declaration in dllcrt1.c and dllmain.cseyko2015-03-032-3/+3
| | | | | There is a DllMain() declaration in the mingw-runtime-4.0.3.1 and it differs from a tcc one.
* wincrt1.c: add definition of the __TRY__ if not definedseyko2015-03-032-0/+16
| | | | Some i686-pc-mingw32-gcc don't know about __TRY__
* crt1.c revisionCarlos Montiers2014-12-301-23/+53
|
* little optimization to crt1Carlos Montiers2014-11-231-5/+6
|
* __getmainargs compatibility checking successCarlos Montiers2014-11-221-10/+14
|
* win32: fix implicit function warningJames Buren2014-11-031-0/+2
| | | | | This includes windows.h to fix a warning about an implicit function usage of ExitProcess().
* Removed the error message and minor changes.Carlos Montiers2014-07-171-9/+11
|
* __getmainargs return int, not void, and on error, it return -1 and let argv ↵Carlos Montiers2014-07-161-2/+7
| | | | untouched, also argc. Added a if checking the result of it.
* 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-282-1/+7
| | | | | | | | | | | | | | | | | | | | | | | - 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
* win32: wincrt1.c: include stdlib.h for exit()grischka2013-02-041-0/+1
|
* 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.
* 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
* build: remove #include "config.h" from target dependent filesgrischka2010-11-261-2/+0
| | | | This is to make cross build of libtcc1.a easier.
* win32: register SEH in startup code (i386 only)grischka2010-10-193-2/+124
| | | | Needed to handle signal() etc. with msvcrt
* win64: add tiny unwind data for setjmp/longjmpgrischka2009-12-201-3/+11
| | | | | | | | | 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.
* win64: adjust for two args with setjmp(buf,ctx)grischka2009-12-191-0/+8
|
* win32: reformat examples, crt etcgrischka2009-07-182-36/+49
|
* x86-64: chkstk, allocagrischka2009-07-181-21/+53
|
* win64: use new headers from mingwgrischka2009-07-181-0/+617
|
* _controlfp fix (grischka)bellard2005-04-172-84/+84
|
* dos2unixbellard2005-04-177-2587/+2587
|
* win32 mergebellard2005-04-149-0/+2671