aboutsummaryrefslogtreecommitdiff
path: root/win32/build-tcc.bat
Commit message (Collapse)AuthorAgeFilesLines
* various stuffgrischka2017-10-111-47/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 'long' reviewgrischka2017-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | add some features for more complete 'long' support tcc.h: - use LONG_SIZE=4/8 instead of TCC_LONG_ARE_64_BIT tccgen.c: - add ptrdiff_type, update size_type - support shift and ?: operations - support long enum types - display 'long' from type_to_str - nwchar_t is unsigned short on windows - unrelated: use memcpy in init_putv for long doubles to avoid random bytes in the image (if tcc was compiled by gcc) for diff purposes. tccpp.c: - make parse_number return correct types - improve multi-character-constants 'XX' 'abcd' Changelog: - update
* tccgen: nodata_wanted fix, default ONE_SOURCE, etc...grischka2017-07-231-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | 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_...
* final adjustments for releasegrischka2017-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | - configure/Makefiles: minor adjustments - build-tcc.bat: add -static to gcc options (avoids libgcc_s*.dll dependency with some mingw versions) - tccpe.c/tcctools.c: eliminate MAX_PATH (not available for cross compilers) - tccasm.c: use uint64_t/strtoull in unary() (unsigned long sometimes is only uint32_t, as always on windows) - tccgen.c: Revert (f077d16c) "tccgen: gen_cast: cast FLOAT to DOUBLE" Was a rather experimental, tentative commit, not really necessary and somewhat ugly too. - cleanup recent osx support: - Makefile/libtcc.c: cleanup copy&paste code - tccpp.c: restore deleted function
* cross-compilers: allow individual configurationgrischka2017-02-231-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | since configure supports only native configuration a file 'cross-tcc.mak' needs to be created manually. It is included in the Makefile if present. # ---------------------------------------------------- # Example config-cross.mak: # # windows -> i386-linux cross-compiler # (it expects the linux files in <prefix>/i386-linux) ROOT-i386 = {B}/i386-linux CRT-i386 = $(ROOT-i386)/usr/lib LIB-i386 = $(ROOT-i386)/lib:$(ROOT-i386)/usr/lib INC-i386 = {B}/lib/include:$(ROOT-i386)/usr/include DEF-i386 += -D__linux__ # ---------------------------------------------------- Also: - use libtcc1-<target>.a instead of directories - add dummy arm assembler - remove include dependencies from armeabi.c/lib-arm64.c - tccelf/ld_add_file: add SYSROOT (when defined) to absolute filenames coming from ld-scripts
* tcctools.c: integrate tiny_libmaker/_impdefgrischka2017-02-181-18/+13
| | | | | | | | | | | | | | usage: tcc -ar [rcsv] lib files... tcc -impdef lib.dll [-v] [-o lib.def] also: - support more files with -c: tcc -c f1.c f2.c ... - fix a bug which caused tcc f1.c f2.S to produce no asm - allow tcc -ar @listfile too - change prototype: _void_ tcc_set_options(...) - apply -Wl,-whole-archive when a librariy is given as libxxx.a also (not just for -lxxx)
* win32: adjust new unicode supportgrischka2017-02-181-5/+5
| | | | | | | | | | | | | | | | | | | - 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-171-1/+5
| | | | | | '-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).
* win32: build-tcc.bat: figure out correct bitness of cl.exeVlad Vissoultchev2017-02-141-6/+21
|
* updates & cleanups (tcc-doc/Changelog/TODO ...)grischka2017-02-131-3/+20
| | | | | | | | | | | | | | | - 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
* win32: build-tcc.bat: add some optionsgrischka2017-02-081-52/+134
| | | | | | | | | | | | | | | | | | In particular: -c <compiler> : Allow using tcc to compile itself -i <dir> : Create installation in dir Summary: usage: build-tcc.bat [ options ... ] options: -c prog use prog (gcc or tcc) to compile tcc -c "prog options" use prog with options to compile tcc -t 32/64 force 32/64 bit default target -v "version" set tcc version -i dir install tcc into dir -d create tcc-doc.html too (needs makeinfo)
* win32/64: msys2 supportgrischka2016-10-021-8/+7
| | | | | | | | | | | | Support ./configure && make under msys2 (a new msys fork) on win32 and win64. Get rid of CONFIG_WIN64 make-var. (On windows, WIN32 in general is used for both 32 and 64 bit platforms) Also: - cleanup win32/build-tcc.bat - adjust win32/(doc/)tcc-win32.tx
* build: revert Makefiles to 0.9.26 state (mostly)grischka2016-10-011-12/+7
| | | | | | | | | | | | 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)
* VS2015 solution and project filesseyko2016-04-131-2/+3
| | | | | | | | | | | | | From: Vlad Vissoultchev Date: Mon, 11 Apr 2016 01:32:28 +0300 Subject: Add VS2015 solution and project files to `win32/vs2015` directory This allows release/debug builds for both x86 and x64 targets. Some warnings had to be suppressed. Output libtcc.dll and tcc.exe are copied to parent `win32` directory w/ a post-build action.
* Revert spawnvp param cast and use `no-incompatible-pointer-types` in ↵Vlad Vissoultchev2016-03-141-2/+2
| | | | build-tcc.bat
* Win32 build script handles `x64` and `debug` paramsVlad Vissoultchev2016-03-131-6/+11
|
* workaround a wine cmd bug in build-tcc.batAustin English2014-01-201-1/+1
|
* 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
* Add the possibility to use noname functions by ordinalYX Hao2013-09-191-1/+8
| | | | | | | | | | | | | | | | | | | | | 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: build-tcc.bat: get rid of hardcoded VERSION stringgrischka2012-12-201-10/+6
| | | | | | | Also: - put libtcc.def into libtcc dir - remove ar references - remove libtcc_test from build
* win32: tcc.exe uses libtcc.dllgrischka2012-04-181-4/+1
|
* 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
|
* 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.
* 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-261-17/+20
| | | | This is to make cross build of libtcc1.a easier.
* 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: 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
|
* win64: add x64 target to build-tcc.batgrischka2009-07-181-19/+47
|
* update Changelog, bump version: 0.9.25grischka2009-05-111-1/+1
|
* make tcc from tcc.c and libtcc from libtcc.cgrischka2009-05-051-1/+1
|
* fix makefiles etc for subdirsgrischka2009-04-181-3/+3
|
* win32/build-tcc.bat: define CONFIG_SYSROOTgrischka2008-11-301-0/+1
|
* get rid of a warning and fix .batgrischka2008-03-251-1/+1
|
* Checkin tiny_libmaker (ar replacement) by Timovj Lahdegrischka2008-03-081-6/+3
|
* Some in-between fixes (See Changelog for details).grischka2007-11-251-0/+30