aboutsummaryrefslogtreecommitdiff
path: root/configure
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Detect multiarch triplet and lddir from ldd outputThomas Preud'homme2013-02-131-8/+8
|
* Fix previous commitThomas Preud'homme2013-02-131-1/+1
| | | | Fix commit f6cfaa6d2591b8931f8fde9aebf7822202b78810
* Improve multiarch detectionThomas Preud'homme2013-02-131-0/+16
| | | | | | * Detect multiarch at configure time * Detect based on the place where crti.o is * Define multiarch triplet in tcc.h
* Fix fn_dirname in configure scriptThomas Preud'homme2013-02-081-1/+1
| | | | | Use ${parameter%word} construct to fix fn_dirname in configure script. Bonus: on less fork.
* tests: cleanupgrischka2013-02-051-1/+1
| | | | | | | | | | | | | | | | tests: - add "hello" to test first basic compilation to file/memory - add "more" test (tests2 suite) - remove some tests tests2: - move into tests dir - Convert some files from DOS to unix LF - remove 2>&1 redirection win32: - tccrun.c: modify exception filter to exit correctly (needed for btest) - tcctest.c: exclude weak_test() (feature does not exist on win32)
* configure: use relative paths for in-tree buildgrischka2013-01-301-14/+15
| | | | | | Also - move CPPFLAGS to Makefile - Use top_srcdir in lib/Makefile
* Fix out-of-tree build with relative path to rootThomas Preud'homme2013-01-141-2/+2
| | | | | Fix path of Makefile symlinks in a out-of-tree build where the root directory of the source is given as a relative path.
* configure: support absolete out-of-tree buildsAkim Demaille2012-12-211-3/+8
| | | | | configure: handle the case of absolute paths. Reported by grishka.
* configure: style changesAkim Demaille2012-12-211-11/+13
| | | | * configure: use more here-documents.
* configure: prefer here-documentsAkim Demaille2012-12-211-53/+53
| | | | | * configure: use here-documents to improve readability and reduce the clutter.
* configure: style changesAkim Demaille2012-12-211-13/+7
| | | | | * configure (case $targetos): Improve readibility. (case $cpu): New, to improve readability compare to if + test.
* build: fix VPATH buildsAkim Demaille2012-12-181-11/+29
| | | | | | | | | | * 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.
* Detect ARM CPU version in configureThomas Preud'homme2012-12-041-1/+16
| | | | | Instead of guessing the ARM CPU version to compile for from tcc.h, we now detect it in configure and output the value in config.h
* Add armv6l to ARM supported processorsThomas Preud'homme2012-11-111-1/+1
| | | | | Add armv6l to the list of supported ARM architecture (as returned by uname -m) in ./configure
* Evaluate configure argumentsThomas Preud'homme2012-06-121-0/+1
| | | | | | Evaluate configure arguments to reproduce autotools behavior. Autotools actually only expands a few variable and do it at make time but it makes the change much simpler.