aboutsummaryrefslogtreecommitdiff
path: root/configure
Commit message (Collapse)AuthorAgeFilesLines
* configure: fix permissionsgrischka2017-04-261-0/+0
| | | | | There must be something with git on windows that it messes up x permissions sometimes.
* final adjustments for releasegrischka2017-04-251-15/+19
| | | | | | | | | | | | | | | | | | | | | - 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: early OSX native supportAndrei Warkentin2017-04-251-0/+8
| | | | | | | | | | | | - 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/+2
| | | | The port is functional. Bound checking is not supported yet.
* tcc: re-enable correct option -r supportgrischka2017-02-201-5/+5
| | | | | | | | | | | | | | | 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
* updates & cleanups (tcc-doc/Changelog/TODO ...)grischka2017-02-131-22/+19
| | | | | | | | | | | | | | | - 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
* tests: add .so/.dll creation testgrischka2016-12-151-0/+3
| | | | | Also remove bitfield test from tcctest.c because gcc versions don't agree among each other.
* configure: prefer lib64 on 64-bit platformsgrischka2016-11-281-3/+4
| | | | | | | use lib64 if - "/usr/lib/multi-arch-triplet" does not work and - we are on a 64-bit platform and - lib64 exists and does contain crti.o
* configure: --triplet= option, Makefile: cleanupgrischka2016-10-171-22/+24
|
* build: win: detect also mingw64 in msys2 setupAvi Halachmi (:avih)2016-10-101-1/+1
| | | | | | | | | | MSYS2 installs 3 environments, with uname (e.g. on win8.1 64) as follows: - MINGW32_NT-6.3 gcc -> stand-alone native i686 binaries - MINGW64_NT-6.3 gcc -> stand-alone native x86_64 binaries - MSYS_NT-6.3 gcc -> posix-ish binaries which can only run in this env Therefore 'MINGW' is more generic and detects both 32/64 native environments, where previously 'MINGW32' detected only the 32 one.
* build: win32: don't use mklink - use ln or fallback to cpAvi Halachmi (:avih)2016-10-101-5/+2
| | | | | | | | | | | | | | | | | For the following reasons: - Native windows links are rarely used in general. - Require elevated privileges even if the current user has administrator privileges (needs further "run as administrator"). - Most/all windows shell environments capable of running configure already support ln (msys[1], msys2, most probably cygwin too). - If cross building tcc on linux for windows then native mklink is not available, as well as 'cmd' (in this scenario the build later fails for other reasons, but at least configures succeeds now). - cp is good enough as fallback since we only copy 5 makefiles anyway. - The only environment I'm aware of which doesn't support ln -s is busybox for windows, and with this patch it falls back to cp and completes configure successfully (and the build later succeeds, assuming valid $CC and $AR).
* configure: fix tcc_lddir, cpugrischka2016-10-031-62/+59
| | | | ... and other minor cosmetic fixes
* win32/64: msys2 supportgrischka2016-10-021-0/+1
| | | | | | | | | | | | 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: restore out-of-tree supportgrischka2016-10-011-4/+8
|
* build: revert Makefiles to 0.9.26 state (mostly)grischka2016-10-011-184/+135
| | | | | | | | | | | | 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)
* Allow to perform tests from the custom build dir:seyko2016-05-201-15/+8
| | | | | | | | mkdir build; cd build ../configure --prefix=./package make make test make install
* fix a mingw64 build on Linux with --enable-tcc64-mingwseyko2016-05-201-2/+7
| | | | | * define CONFIG_WIN64=yes when ARCH=x86-64 (not CONFIG_WIN32=yes) * CONFIG_WIN64 now use a windows install part (not a Linux one)
* [avih] configure: support custom ar with --ar=seyko2016-05-201-0/+4
| | | | | | | Author: Avi Halachmi (:avih) Date: Mon Nov 2 18:46:32 2015 +0200 configure: support custom ar with --ar=
* configure: docdir fixseyko2016-05-201-1/+1
| | | | | was /usr/local/share/doc/usr/local/lib/tcc now /usr/local/share/doc
* Revert all of my changes to directories & codingstyle.gus knight2015-07-291-5/+5
|
* Reorganize the source tree.gus knight2015-07-271-4/+4
| | | | | | | | | | * 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...
* Trim trailing spaces everywhere.gus knight2015-07-271-1/+1
|
* restore "./configure --enable-tcc32-mingw" on linuxseyko2015-05-101-0/+6
| | | | | | commit "tccpp: fix issues, add tests" also include - configure/Makefile : build on windows (MSYS) was broken which breaks a cross compilation on linux
* tccpp: fix issues, add testsgrischka2015-05-091-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix some macro expansion issues * add some pp tests in tests/pp * improved tcc -E output for better diff'ability * remove -dD feature (quirky code, exotic feature, didn't work well) Based partially on ideas / researches from PipCet Some issues remain with VA_ARGS macros (if used in a rather tricky way). Also, to keep it simple, the pp doesn't automtically add any extra spaces to separate tokens which otherwise would form wrong tokens if re-read from tcc -E output (such as '+' '=') GCC does that, other compilers don't. * cleanups - #line 01 "file" / # 01 "file" processing - #pragma comment(lib,"foo") - tcc -E: forward some pragmas to output (pack, comment(lib)) - fix macro parameter list parsing mess from a3fc54345949535524d01319e1ca6378b7c2c201 a715d7143d9d17da17e67fec6af1c01409a71a31 (some coffee might help, next time ;) - introduce TOK_PPSTR - to have character constants as written in the file (similar to TOK_PPNUM) - allow '\' appear in macros - new functions begin/end_macro to: - fix switching macro levels during expansion - allow unget_tok to unget more than one tok - slight speedup by using bitflags in isidnum_table Also: - x86_64.c : fix decl after statements - i386-gen,c : fix a vstack leak with VLA on windows - configure/Makefile : build on windows (MSYS) was broken - tcc_warning: fflush stderr to keep output order (win32)
* warn about declarations after statements when compiling with gcc.Philip2015-04-271-0/+5
|
* fix installation amd bcheck for Windowsseyko2015-04-101-5/+10
| | | | | | | | | | | | | | | | | | | | | | * 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.
* Adjusted configure host_os to use uname for DarwinRaphael Cohn2015-04-071-1/+1
| | | | | 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.
* Adjusted configure to be more BSD friendlyRaphael Cohn2015-04-071-1/+1
|
* configure: don't output CONFIG_LDDIR when build_cross = "yes"seyko2015-03-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This fixes i386-tcc on CentOS 7. After patch [root@centos7 tinycc]# ./i386-tcc -vv tcc version 0.9.26 (i386, Linux) install: /usr/local/lib/tcc crt: /usr/lib libraries: /usr/lib /lib /usr/local/lib Before patch: [root@centos7 tinycc]# ./i386-tcc -vv tcc version 0.9.26 (i386, Linux) install: /usr/local/lib/tcc crt: /usr/lib64 libraries: /usr/lib64 /lib64 /usr/local/lib64
* A native tcc for MSYS (Windows) must be i386-win-tcc.exe and not i386-tcc.exeseyko2015-03-101-1/+4
| | | | | 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)
* --enable-tcc32-mingw option: build windows version on linux with i386-win-tccseyko2015-03-041-1/+9
| | | | --enable-tcc64-mingw option: build windows version on linux with x86_64-win-tcc
* gcc options and mingw: move a gcc options detection from a makefile to the ↵seyko2015-03-041-2/+16
| | | | | | | | 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
* a libraries pathsseyko2015-03-041-7/+21
| | | | | | | | | | | | * x86_64-tcc: use /usr/lib64,.. instead of /usr/lib,.. * don't set tcc_lddir="lib64" if cpu="x86" * put a definition of the CONFIG_LDDIR into config.h instead of the config.mak Otherwise a "lib" string may be used by default. This is a usual case when building a x86_64-tcc (there was no -DCONFIG_LDDIR building this binary). * suppress -Wdeprecated-declarations for gcc which complain on malloc hooks in bcheck.c if glibc is quite new.
* a cpu option of the configure script as a method to specify a target cpuseyko2015-03-041-29/+27
| | | | | | | | | | * don't setup a cpu before scanning for --cpu= * --cpu= option sets a 'cpu' variable, not a 'build_cpu', 'build_cpu' was not used anywhere. * if cpu="" and ARCH != "" then cpu=$ARCH else cpu=`uname -m` * replace "Build CPU" with "Target CPU" in the output of the configure script. output this value only when not builing a cross compilers. * remove a HOST_I386, ... defines from a config.h file. thise defines are not used anywhere and cpu is now used to define a target cpu
* Add arm64 (AArch64) as a target architecture.Edmund Grimley Evans2015-02-231-0/+6
|
* Make build CPU detection a tad more flexibleThomas Preud'homme2014-04-121-50/+59
|
* build: add initial NetBSD support.minux2014-04-121-0/+1
| | | | | | | | | | | | Not able to generate ELF files on NetBSD yet (lacks the note and crt1.o is actually named crt0.o on NetBSD), but -run works with these extra defines: -D__lint__ -D"__symbolrename(x)=asm(#x)" -D__NetBSD__ The -D__lint__ is an ugly hack, TCC should be able to emulate GCC just fine, but it seems TCC doesn't support __builtin_va_list yet? typedef __builtin_va_list __va_list; /usr/include/sys/ansi.h:72: error: ';' expected (got "__va_list")
* be stricter with aliasinggrischka2014-01-071-0/+0
| | | | | | | | | | | | | | Refactoring (no logical changes): - use memcpy in tccgen.c:ieee_finite(double d) - use union to store attribute flags in Sym Makefile: "CFLAGS+=-fno-strict-aliasing" basically not necessary anymore but I left it for now because gcc sometimes behaves unexpectedly without. Also: - configure: back to mode 100755 - tcc.h: remove unused variables tdata/tbss_section - x86_64-gen.c: adjust gfunc_sret for prototype
* i386: use __fixdfdi instead of __tcc_cvt_ftolgrischka2014-01-061-1/+1
| | | | | | | | | | | | Variants __fixsfdi/__fixxfdi are not needed for now because the value is converted to double always. Also: - remove __tcc_fpinit for unix as it seems redundant by the __setfpucw call in the startup code - avoid reference to s->runtime_main in cross compilers - configure: fix --with-libgcc help - tcctok.h: cleanup
* Use libtcc.a for static link even with USE_LIBGCCThomas Preud'homme2014-01-031-1/+1
| | | | | | | When statically linking, runtime library should be static as well. tcc could link with libgcc.a but it's in a gcc version specific directory. Another solution, followed by this patch, is to use libtcc.a when statically linking, even if USE_LIBGCC was configured.
* Fix lib, include, crt and libgcc search pathsThomas Preud'homme2013-09-071-1/+1
|
* Improved variable length array support.James Lyon2013-04-271-0/+7
| | | | | | | | | | | | | | | VLA storage is now freed when it goes out of scope. This makes it possible to use a VLA inside a loop without consuming an unlimited amount of memory. Combining VLAs with alloca() should work as in GCC - when a VLA is freed, memory allocated by alloca() after the VLA was created is also freed. There are some exceptions to this rule when using goto: if a VLA is in scope at the goto, jumping to a label will reset the stack pointer to where it was immediately after the last VLA was created prior to the label, or to what it was before the first VLA was created if the label is outside the scope of any VLA. This means that in some cases combining alloca() and VLAs will free alloca() memory where GCC would not.
* Fix configure script on FreeBSDThomas Preud'homme2013-03-141-1/+2
| | | | | * x86-64 architectures are reported as amd64 by uname -r * FreeBSD platform don't need -ldl for linking
* configure: detect ARM variantsgrischka2013-02-141-0/+18
| | | | Using gnu make's variable variable-names.
* configure: pass CONFIG_xxxDIR/PATH options via commandlinegrischka2013-02-141-32/+16
| | | | | | | | | | | | | | | - 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
* Add missing heading slash to detect /lib64 systemsThomas Preud'homme2013-02-141-1/+1
|
* Another attempt to "detect" multiarchThomas Preud'homme2013-02-141-8/+14
|
* configure: cleanupgrischka2013-02-141-169/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add quotes: eval opt=\"$opt\" - use $source_path/conftest.c for OOT build - add fn_makelink() for OOT build - do not check lddir etc. on Windows/MSYS - formatting config-print.c - rename to conftest.c (for consistency) - change option e to b - change output from that from "yes" to "no" - remove inttypes.h dependency - simpify version output Makefile: - improve GCC warning flag checks tcc.h: - add back default CONFIG_LDDIR - add default CONFIG_TCCDIR also (just for fun) tccpp.c: - fix Christian's last warning tccpp.c: In function ‘macro_subst’: tccpp.c:2803:12: warning: ‘*((void *)&cval+4)’ is used uninitialized in this function [-Wuninitialized] That the change fixes the warning doesn't make sense but anyway. libtcc.c: - tcc_error/warning: print correct source filename/line for token :paste: (also inline :asm:) lddir and multiarch logic still needs fixing.
* Create config-print program to test $ccThomas Preud'homme2013-02-131-46/+6
| | | | | | Create a helper program called config-print to print informations relative to the BUILD/HOST environment in the case of native compilation.
* Various fixes for f9ac2013Thomas Preud'homme2013-02-131-7/+3
|