aboutsummaryrefslogtreecommitdiff
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* configure: --config-musl/-uClibc switch & misc cleanupsgrischka2017-05-131-18/+12
| | | | | | | | | | | | | | | - configure: - add --config-uClibc,-musl switch and suggest to use it if uClibc/musl is detected - make warning options magic clang compatible - simplify (use $confvars instead of individual options) - Revert "Remove some unused-parameter lint" 7443db0d5f841b81a55e918bf8c228dd20f9ddb2 rather use -Wno-unused-parameter (or just not -Wextra) - #ifdef functions that are unused on some targets - tccgen.c: use PTR_SIZE==8 instead of (X86_64 || ARM64) - tccpe.c: fix some warnings - integrate dummy arm-asm better
* more minor fixesgrischka2017-05-071-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | * tccgen: re-allow long double constants for x87 cross sizeof (long double) may be 12 or 16 depending on host platform (i386/x86_64 on unix/windows). Except that it's 8 if the host is on windows and not gcc was used to compile tcc. * win64: fix builtin_va_start after VT_REF removal See also a8b83ce43a95fa519dacfe7690a3a0098af7909c * tcctest.c: remove outdated limitation for ll-bitfield test It always worked, there is no reason why it should not work in future. * libtcc1.c: exclude long double conversion on ARM * Makefile: remove CFLAGS from link recipes * lib/Makefile: use target DEFINES as passed from main Makefile * lib/armflush.c lib/va_list.c: factor out from libtcc1.c * arm-gen.c: disable "depreciated" warnings for now
* Rebuild cross compilers when sources changeMichael Matz2017-05-021-1/+1
| | | | | | | | ONE_SOURCE=yes cross-compilers currently only depend on tcc.c, which itself has no further deps. So e.g. changing tccgen.c or tcctok.h don't automatically rebuild cross compilers. Let's go over the intermediate $(X)tcc.o file which automatically depends on LIBTCC_INC, which are all relevant source files.
* final adjustments for releasegrischka2017-04-251-61/+53
| | | | | | | | | | | | | | | | | | | | | - 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
* tcc: fixup clang warningsAndrei Warkentin2017-04-251-1/+1
| | | | | | | | | | | The O(xxx) stuff in i386-asm.c had me scratching my head. Extracting the macro and trying it out in a separate program doesn't give me any warnings, so I'm confused about what could be going on there. Any cast will make things happy. I used a uint64_t to catch actual cases of overflow, which will still cause a -Wconstant-conversion warning. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
* tcc: early OSX native supportAndrei Warkentin2017-04-251-2/+20
| | | | | | | | | | | | - build scripts - working '-run' mode, e.g.: ./tcc -B. -I./include -I. -I.. -D_ANSI_SOURCE -run examples/ex1.c Note: we don't bother parsing Mach-O/Fat images yet. We blindly dlopen the image. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
* Add support of musl-libcMarc Vertes2017-04-201-0/+1
| | | | The port is functional. Bound checking is not supported yet.
* makefile: unify cross with native buildsgrischka2017-02-251-217/+231
| | | | | | | | | | | | | supports building cross compilers on the fly without need for configure --enable-cross $ make cross # all compilers $ make cross-TARGET # only TARGET-compiler & its libtcc1.a with TARGET one from i386 x86_64 i386-win32 x86_64-win32 arm arm64 arm-wince c67 Type 'make help' for more information
* cross-compilers: allow individual configurationgrischka2017-02-231-128/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* tcc: re-enable correct option -r supportgrischka2017-02-201-3/+3
| | | | | | | | | | | | | | | 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
* tcctools.c: integrate tiny_libmaker/_impdefgrischka2017-02-181-10/+10
| | | | | | | | | | | | | | 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)
* updates & cleanups (tcc-doc/Changelog/TODO ...)grischka2017-02-131-6/+8
| | | | | | | | | | | | | | | - 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
* build: Respect CPPFLAGS overrideMichael Matz2016-12-151-0/+2
| | | | so that e.g. make CPPFLAGS=-DSOMETHING works.
* Do section relocation in architecture backendThomas Preud'homme2016-12-031-8/+8
|
* x86_64-asm: =m operand fixesgrischka2016-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | The problem was with tcctest.c: unsigned set; __asm__("btsl %1,%0" : "=m"(set) : "Ir"(20) : "cc"); when with tcc compiled with the HAVE_SELINUX option, run with tcc -run, it would use large addresses far beyond the 32bits range when tcc did not use the pc-relative mode for accessing 'set' in global data memory. In fact the assembler did not know about %rip at all. Changes: - memory operands use (%rax) not (%eax) - conversion from VT_LLOCAL: use type VT_PTR - support 'k' modifier - support %rip register - support X(%rip) pc-relative addresses The test in tcctest.c is from Michael Matz.
* configure: --triplet= option, Makefile: cleanupgrischka2016-10-171-38/+28
|
* OpenBSD does not support -v option in rm command.Christian Jullien2016-10-151-2/+2
|
* build: strip: unify win32 and use the configured $STRIPAvi Halachmi (:avih)2016-10-101-2/+4
| | | | | | | | | | | | | | - There's no need to force STRIP_BINARIES on windows since --enable-strip (at configure) already does exactly that, if one wants to. - Use the contigured $STRIP instead of the native 'strip', useful when cross building tcc. - 'make install-strip' now also strips libtcc.dll on windows (it already does so now with --enable-strip, and previously it always stripped it). Summary of current strip options for all platforms: - configure --enable strip -> 'install -s' for the binaries. - make install-strip: installs and then configured $STRIP the binaries. - Otherwise -> no stripping.
* build: out-of-tree: fix docsAvi Halachmi (:avih)2016-10-101-1/+1
|
* Misc. fixesgrischka2016-10-051-8/+7
| | | | | | | | | | | | | | | | | | | | Makefile : - do not 'uninstall' peoples /usr/local/doc entirely libtcc.c : - MEM_DEBUG : IDE-friendly output "file:line: ..." - always ELF for objects tccgen.c : - fix memory leak in new switch code - move static 'in_sizeof' out of function profiling : - define 'static' to empty resolve_sym() : - replace by dlsym() win32/64: fix R_XXX_RELATIVE fixme - was fixed for i386 already in 8e4d64be2fc1d707c7800c5096f6e0ea22cbd - do not -Lsystemdir if compiling to .o
* configure: fix tcc_lddir, cpugrischka2016-10-031-1/+1
| | | | ... and other minor cosmetic fixes
* win32/64: msys2 supportgrischka2016-10-021-15/+12
| | | | | | | | | | | | 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
* Fix building man pages.orbea2016-10-011-1/+1
| | | | | The path for texi2pod.pl in the makefile was wrong causing the perl script to not be found.
* tcc -E: add one space in cases: tiny solutiongrischka2016-10-011-1/+1
| | | | | | replaces f5f82abc99424c4ece836000934fcf57a867c635 Also: fix tcc flags in Makefile, fix tcc -E
* build: restore out-of-tree supportgrischka2016-10-011-14/+15
|
* build: revert Makefiles to 0.9.26 state (mostly)grischka2016-10-011-212/+130
| | | | | | | | | | | | 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)
* Use etags to produce target TAGS.Jean-Claude Beaudoin2016-09-291-1/+1
|
* More properly propagate ONE_SOURCE.Jean-Claude Beaudoin2016-09-271-1/+8
|
* fix a mingw64 build on Linux with --enable-tcc64-mingwseyko2016-05-201-1/+8
| | | | | * define CONFIG_WIN64=yes when ARCH=x86-64 (not CONFIG_WIN32=yes) * CONFIG_WIN64 now use a windows install part (not a Linux one)
* make and install tiny_libmaker on all platformsseyko2016-05-201-4/+2
| | | | not only on Windows/Darwin.
* Fixed a dependency (error with make -j8).Vincent Lefevre2015-12-151-1/+1
| | | | Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
* Revert all of my changes to directories & codingstyle.gus knight2015-07-291-5/+418
|
* Fix Makefile.gus knight2015-07-291-2/+2
|
* Add a root Makefile for running targets in subdirectories.gus knight2015-07-291-0/+8
|
* Reorganize the source tree.gus knight2015-07-271-421/+0
| | | | | | | | | | * 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...
* fix installation amd bcheck for Windowsseyko2015-04-101-9/+7
| | | | | | | | | | | | | | | | | | | | | | * 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.
* Fix to accommodate missing i386/bcheck.o during install on Mac OS XRaphael Cohn2015-04-071-1/+1
|
* Fix to test for HOST_OS not TARGETOSRaphael Cohn2015-04-071-1/+1
|
* Fixing bug for Linux x86_64 introduced in previous macosx commitRaphael Cohn2015-04-071-2/+2
|
* Adjusted configure host_os to use uname for DarwinRaphael Cohn2015-04-071-1/+10
| | | | | Adjusted Makefile to make it Darwin (Mac OS X 10.10)-friendly for cross-compilers by removing the creation of arm64 cross-compilers on this platform.
* fix: enforce bcheck.o linking when -b option is usedseyko2015-03-261-0/+6
| | | | | fixes a crash for the empry program (tcc -b empty.c) empty.c: int main() { return 0; }
* quick fix for the native tcc on debian/ubuntuseyko2015-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Force to use a NATIVE_DEFINES insteed of the DEFINES for the native tcc. After this change we have on debian/ubuntu # ./x86_64-tcc -vv tcc version 0.9.26 (x86-64, Linux) install: /usr/local/lib/tcc crt: /usr/lib/x86_64-linux-gnu libraries: /usr/lib/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib /usr/local/lib/x86_64-linux-gnu /usr/local/lib include: /usr/local/include/x86_64-linux-gnu /usr/local/include /usr/include/x86_64-linux-gnu /usr/include /usr/local/lib/tcc/include elfinterp: /lib64/ld-linux-x86-64.so.2 Before this change the output was # ./x86_64-tcc -vv tcc version 0.9.26 (x86-64, Linux) install: /usr/local/lib/tcc crt: /usr/lib libraries: /usr/lib /lib /usr/local/lib include: /usr/local/include /usr/include /usr/local/lib/tcc/include elfinterp: /lib64/ld-linux-x86-64.so.2 This change don't fix a cross compilers
* correction for the previous commitseyko2015-03-201-2/+2
| | | | use "x86-64" as a directory name for the libtcc1.a installation when cross-compiling.
* libtcc1.a while "configure --enable-cross"seyko2015-03-201-6/+9
| | | | | 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-1/+1
|
* A native tcc for MSYS (Windows) must be i386-win-tcc.exe and not i386-tcc.exeseyko2015-03-101-0/+13
| | | | | i386-tcc.exe is a compiler for i386 Linux. A HOST_OS variable in Makefile is introduced and used to select a native compiler (which one to name as tcc.exe)
* Makefile: install tcc$(EXESUF) as symlink to the $(ARCH)-tccseyko2015-03-061-4/+2
|
* Makefile: add dependencies for $($(I386_CROSS)_LINK), ...seyko2015-03-061-8/+7
| | | | | This is another solution for the make process. Commit 4b92dbf9237c is reverted.
* Makefile leftover of rev 44c6e99Roy2015-03-061-2/+2
|
* Add a dependency for a PROGS and TCCLIBS to a Makefileseyko2015-03-051-0/+2
| | | | | Simply assume this is all *.c and *.h files in a tcc top directory. Now a tcc compiler is recompiled if any of this files is changed.