aboutsummaryrefslogtreecommitdiff
path: root/lib/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* [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-201-1/+1
| | | | | * define CONFIG_WIN64=yes when ARCH=x86-64 (not CONFIG_WIN32=yes) * CONFIG_WIN64 now use a windows install part (not a Linux one)
* lib/Makefile: filter-out -b flag from XFLAGSseyko2015-11-081-1/+1
| | | | | to build tcc with bound checking ./configure --cc=tcc --extra-cflags-b
* Revert all of my changes to directories & codingstyle.gus knight2015-07-291-8/+8
|
* Reorganize the source tree.gus knight2015-07-271-8/+8
| | | | | | | | | | * Documentation is now in "docs". * Source code is now in "src". * Misc. fixes here and there so that everything still works. I think I got everything in this commit, but I only tested this on Linux (Make) and Windows (CMake), so I might've messed something up on other platforms...
* a bounds checking code for the ARCH=x86_64seyko2015-04-101-1/+1
|
* fix installation amd bcheck for Windowsseyko2015-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | * define targetos=Windows when --enable-tcc32-mingw, --enable-cygwin, ... * use TARGETOS insteed HOST_OS when selecting PROGS * use "$(tccdir)" insteed $(tccdir) on install (spaces in path) * install tcc.exe too * produce bcheck.o when cross-compiling too (lib/Makefile) * force bcheck.o linking by compiling inside tcc_set_output_type() a dummy program with local array. Otherwise bcheck.o may be not linked. * replace %xz format specifier with %p in bcheck (don't supported on Windows) * call a __bound_init when __bound_ptr_add, __bound_ptr_indir, __bound_new_region, __bound_delete_region called. This is because a __bound_init inside ".init" section is not called on Windows for unknown reason. * print on stderr a message when an illegal pointer is returned: there is no segmentation violation on Windows for a program compiled with "tcc -b" * remove "C:" subdir on clean if $HOST_OS = "Linux" * default CFLAGS="-Wall -g -O0" insteed CFLAGS="-Wall -g -O2" to speed up compilation and more precise debugging.
* libtcc1.a while "configure --enable-cross"seyko2015-03-201-1/+1
| | | | | build and install libtcc1.a for i386, x86_64 and arm64 (libtcc1.a for x86_64 was not installed on i386)
* "configure --enable-cross" on x86: build a libtcc1.a for x86_64seyko2015-03-191-4/+2
|
* lib/Makefile: Partial revert of 896a0c881ac3.Edmund Grimley Evans2015-03-101-1/+0
| | | | lib/lib-arm64.c must be compiled by tcc.
* don't use a *-tcc to compile *.S files for ARM*seyko2015-03-101-0/+2
| | | | | A tcc for ARM* don't have an assembler. This is partial reverse of the commit build-libtcc1-by-tcc: use a new tcc to compile a libtcc1.c and alloca.S
* gcc options and mingw: move a gcc options detection from a makefile to the ↵seyko2015-03-041-3/+3
| | | | | | | | configure + define XCC and XAR if mingw32 defined + use XCC and XAR in lib/Makefile if defined Try "./configure --enable-mingw32; make". This must work
* an unification of the tcc cross names for a windowsseyko2015-03-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | produce a i386-win-mingw32-tcc i386-win-tcc x86_64-win-mingw32-tcc x86_64-win-tcc arm-win-mingw32ce-tcc arm-win-tcc instead of the i386-w64-mingw32-tcc i386-win32-tcc x86_64-w64-mingw32-tcc x86_64-win32-tcc arm-wince-mingw32ce-tcc arm-win32-tcc Replacing a *-win32 directory names with a *-win names because this names are based on the names of the tcc x86_64-win32-tcc, i386-win32-tcc
* build-libtcc1-by-tcc: use a new tcc to compile a libtcc1.c and alloca.Sseyko2015-03-041-7/+0
| | | | | | | This will allow to build a libtcc1.a even if a bootstrap compiler don't support a target arch. There was alrady this feature but only for OS Darwin.
* Add arm64 (AArch64) as a target architecture.Edmund Grimley Evans2015-02-231-0/+12
|
* Don't build libtcc1 with -fstack-protector-strongMatteo Cypriani2014-09-071-0/+4
| | | | | | | Prevent libtcc1.a to be compiled with -fstack-protector-strong, so that linking with tcc doesn't fail because symbol '__stack_chk_fail_local' is not present in libtcc1.a. This is useful only if the CFLAGS passed from the main Makefile contain this flag.
* win32: libtcc1.a needs to be built with tccgrischka2014-04-071-2/+5
| | | | | gcc/mingw produces msvc compatible pecoff objects, tcc only knows ELF.
* arm: Provide alloca()Michael Matz2014-04-051-2/+2
| | | | | | This provides a simple implementation of alloca for ARM (and enables the associated testcase). As tcc for ARM doesn't contain an assembler, we'll have to resort using gcc for compiling it.
* shared libs: Build libtcc1.a with -fPICMichael Matz2014-04-021-1/+5
| | | | | TCCs runtime library must be compiled as position independend code, so it can be linked into shared libraries.
* misc. fixesgrischka2014-01-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | - 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 ARM aeabi functions needed to run tcctestThomas Preud'homme2013-12-111-1/+1
| | | | | | | | | | | | Add implementation for float / integer conversion functions: __aeabi_d2lz, __aeabi_d2ulz, __aeabi_f2lz, __aeabi_f2ulz, __aeabi_l2d, __aeabi_l2f, __aeabi_ul2d, __aeabi_ul2f Add implementation for long long helper functions: __aeabi_ldivmod, __aeabi_uldivmod, __aeabi_llsl, __aeabi_llsr, __aeabi_lasr Add implementation for integer division functions: __aeabi_uidiv, __aeabi_uidivmod, __aeabi_idiv, __aeabi_idivmod,
* Add __clear_cache implementation in libtcc1Thomas Preud'homme2013-11-051-0/+11
| | | | Add __clear_cache function for flushing caches to libtcc1.
* Fixed tests on Windows (including out-of-tree problems)James Lyon2013-04-171-0/+3
| | | | | | | | | | | Modified tcctest.c so that it uses 'double' in place of 'long double' with MinGW since this is what TCC does, and what Visual C++ does. Added an option -norunsrc to tcc to allow argv[0] to be set independently of the compiled source when using tcc -run, which allows tests that rely on the value of argv[0] to work in out-of-tree builds. Also added Makefile rules to automatically update out-of-tree build Makefiles when in-tree Makefiles have changed.
* configure: pass CONFIG_xxxDIR/PATH options via commandlinegrischka2013-02-141-2/+2
| | | | | | | | | | | | | | | - except for CONFIG_SYSROOT and CONFIG_TCCDIR Strictly neccessary it is only for CONFIG_MULTIARCHDIR because otherwise if it's in config.h it is impossible to leave it undefined. But it is also nicer not to use these definitions for cross-compilers. - Also: lib/Makefile : include ../Makefile for CFLAGS lib/libtcc1.c : fix an issue compiling tcc with tcc on x64
* tcc -vv/--print-search-dirs: print more infogrischka2013-02-101-1/+1
| | | | | | | | | | | | | | 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-2/+1
| | | | | | | | 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.
* lib/Makefile: use CC, add bcheck to libtcc1.agrischka2013-02-061-19/+23
| | | | | | | | Also: - fix "make tcc_p" (profiling version) - remove old gcc flags: -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 - remove test "hello" for Darwin (cannot compile to file)
* configure: use relative paths for in-tree buildgrischka2013-01-301-2/+2
| | | | | | Also - move CPPFLAGS to Makefile - Use top_srcdir in lib/Makefile
* build: fix VPATH buildsAkim Demaille2012-12-181-2/+1
| | | | | | | | | | * configure (fn_dirname): New. Use it to ensure the creation of proper symlinks to Makefiles. (config.mak): Define top_builddir and top_srcdir. (CPPFLAGS): Be sure to find the headers. * Makefile, lib/Makefile, tests/Makefile, tests2/Makefile: Adjust to set VPATH properly. Fix confusion between top_builddir and top_srcdir.
* Honour *FLAGS everywhereThomas Preud'homme2012-11-061-3/+3
| | | | Add CPPFLAGS, CFLAGS and LDFLAGS everywhere it's missing.
* Further changes improving the OSX build. Everything builds. libtest passes.Milutin Jovanovic2012-03-061-4/+14
| | | | | | | | | | | | | | | | | | | | Other tests still have issues, currently with weak linking. One of the primary stumbling blocks on OSX is the lack of support for mach-o binaries. Therefore all tcc usage on OSX has to be limited to elf binaries, presumably produced by tcc itself. Therefore I had to enable building of tiny_libmaker for OSX. Then changed the make to use tcc and tiny_libmaker to compile the tcclib1. In order to compile the tests, specifically the parts that use weak linking, I have had to define MACOSX_DEPLOYMENT_TARGET to 10.2, which seems like a hack, but extensive searching seems to indicate that this is the only way to make apple gcc allow weak linking. Using any other value, bigger or smaller breaks weak linking. Also added _ANSI_SOURCE define required by some OSX headers, and some cosmetic gitignore changes. I believe these changes should not impact other platforms.
* Attempt to fix 32 bit OSX build. The fix consists of adding -m32 and -m64Milutin Jovanovic2012-02-161-2/+2
| | | | | | | | to the appropriate CFLAGS. In addition, memory hooks are very different on OSX, so build of bcheck.c had to be disabled for now. Change of the CFLAGS does affect builds on other platforms, and this needs to be tested.
* make: new lib/Makefile for libtcc1.a on more platformsgrischka2010-12-041-0/+90
win32/64 cross-compilers now build libtcc1.a and install it together with the windows headers in a 'win32' sub-directory of TCCDIR.