diff options
| author | grischka <grischka> | 2017-10-11 18:13:43 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2017-10-11 18:13:43 +0200 |
| commit | da8c62f75d893449e232944fc62566c020b4d010 (patch) | |
| tree | 977fec8d53d90ceb8c718f07f47c2bc9cbd6edfc /configure | |
| parent | faa9744f5d13c94c7298bf08e8d1eedca5db88a9 (diff) | |
| download | tinycc-da8c62f75d893449e232944fc62566c020b4d010.tar.gz tinycc-da8c62f75d893449e232944fc62566c020b4d010.tar.bz2 | |
various stuff
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
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 68 |
1 files changed, 26 insertions, 42 deletions
@@ -56,7 +56,6 @@ case $targetos in DLLSUF=".dylib" ;; MINGW*|MSYS*|CYGWIN*) - confvars="$confvars WIN32" mingw32=yes ;; DragonFly|OpenBSD|FreeBSD|NetBSD) @@ -126,8 +125,6 @@ for opt do ;; --cpu=*) cpu=`echo $opt | cut -d '=' -f 2` ;; - --enable-mingw32) confvars="$confvars WIN32"; mingw32="yes" - ;; --enable-cross) confvars="$confvars cross" ;; --disable-static) confvars="$confvars static=no" @@ -142,6 +139,8 @@ for opt do ;; --with-selinux) confvars="$confvars selinux" ;; + --config-mingw32*) mingw32=$(echo "$opt=yes" | cut -d '=' -f 2) + ;; --config-*) confvars="$confvars ${opt#--config-}"; suggest="no" ;; --help|-h) show_help="yes" @@ -216,22 +215,12 @@ if test "$mingw32" = "yes" ; then if test "$cc" = gcc; then test -z "$LDFLAGS" && LDFLAGS="-static" fi - if test x"$tccdir" = x""; then - tccdir="tcc" - fi - if test -z "$prefix" ; then - prefix="C:/Program Files/${tccdir}" - fi - if test -z "$sharedir" ; then - sharedir="${prefix}" - fi - execprefix="$prefix" - bindir="${prefix}" - tccdir="${prefix}" - libdir="${prefix}/lib" - docdir="${sharedir}/doc" - mandir="${sharedir}/man" - infodir="${sharedir}/info" + test -z "$prefix" && prefix="C:/Program Files/tcc" + test -z "$tccdir" && tccdir="${prefix}" + test -z "$bindir" && bindir="${tccdir}" + test -z "$docdir" && docdir="${tccdir}/doc" + test -z "$libdir" && libdir="${tccdir}/libtcc" + confvars="$confvars WIN32" LIBSUF=".lib" EXESUF=".exe" DLLSUF=".dll" @@ -263,12 +252,11 @@ else if test x"$tccdir" = x""; then tccdir="${libdir}/tcc" fi + if test x"$includedir" = x""; then + includedir="${prefix}/include" + fi fi # mingw32 -if test x"$includedir" = x""; then - includedir="${prefix}/include" -fi - if test x"$show_help" = "xyes" ; then cat << EOF Usage: configure [options] @@ -302,7 +290,6 @@ Advanced options (experts only): --enable-static make libtcc.a instead of libtcc.dll (win32) --disable-rpath disable use of -rpath with the above --with-libgcc use libgcc_s.so.1 instead of libtcc1.a - --enable-mingw32 build windows version on linux with mingw32 --enable-cross build cross compilers --with-selinux use mmap for executable memory (with tcc -run) --sysincludepaths=... specify system include paths, colon separated @@ -310,7 +297,7 @@ Advanced options (experts only): --crtprefix=... specify locations of crt?.o, colon separated --elfinterp=... specify elf interpreter --triplet=... specify system library/include directory triplet - --config-uClibc,-musl... enable specific configuration for some systems + --config-uClibc,-musl,-mingw32... enable system specific configurations EOF #echo "NOTE: The object files are build at the place where configure is launched" exit 1 @@ -320,15 +307,14 @@ cc="${cross_prefix}${cc}" ar="${cross_prefix}${ar}" strip="${cross_prefix}${strip}" -CONFTEST=./conftest$EXESUF -if ! $cc -o $CONFTEST $source_path/conftest.c 2>/dev/null ; then - echo "configure: error: '$cc' failed to compile conftest.c." -else - gcc_major="$($CONFTEST version)" - gcc_minor="$($CONFTEST minor)" -fi - if test -z "$cross_prefix" ; then + CONFTEST=./conftest$EXESUF + if ! $cc -o $CONFTEST $source_path/conftest.c 2>/dev/null ; then + echo "configure: error: '$cc' failed to compile conftest.c." + else + gcc_major="$($CONFTEST version)" + gcc_minor="$($CONFTEST minor)" + fi bigendian="$($CONFTEST bigendian)" if test "$mingw32" = "no" ; then @@ -401,13 +387,13 @@ fi fcho() { if test -n "$2"; then echo "$1$2"; fi } -echo "Binary directory $bindir" -echo "TinyCC directory $tccdir" -echo "Library directory $libdir" -echo "Include directory $includedir" -echo "Manual directory $mandir" -echo "Info directory $infodir" -echo "Doc directory $docdir" +fcho "Binary directory " "$bindir" +fcho "TinyCC directory " "$tccdir" +fcho "Library directory " "$libdir" +fcho "Include directory " "$includedir" +fcho "Manual directory " "$mandir" +fcho "Info directory " "$infodir" +fcho "Doc directory " "$docdir" fcho "Target root prefix " "$sysroot" echo "Source path $source_path" echo "C compiler $cc ($gcc_major.$gcc_minor)" @@ -471,8 +457,6 @@ print_mak CONFIG_LDDIR "$tcc_lddir" print_mak CONFIG_TRIPLET "$triplet" print_mak_int TCC_CPU_VERSION "$cpuver" -echo "#define GCC_MAJOR $gcc_major" >> $TMPH -echo "#define GCC_MINOR $gcc_minor" >> $TMPH if test "$cpu" = "aarch64" ; then echo "ARCH=arm64" >> config.mak else |
