mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-19 05:30:07 +08:00
a libraries paths
* 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.
This commit is contained in:
parent
7ec39e2288
commit
7ed4341538
28
configure
vendored
28
configure
vendored
@ -237,15 +237,25 @@ else
|
|||||||
if test x"$execprefix" = x""; then
|
if test x"$execprefix" = x""; then
|
||||||
execprefix="${prefix}"
|
execprefix="${prefix}"
|
||||||
fi
|
fi
|
||||||
|
if test x"$tccdir" = x""; then
|
||||||
|
tccdir="tcc"
|
||||||
|
fi
|
||||||
if test x"$libdir" = x""; then
|
if test x"$libdir" = x""; then
|
||||||
libdir="${execprefix}/lib"
|
libdir="${execprefix}/lib"
|
||||||
|
if test -n "${tccdir}"; then
|
||||||
|
tccdir="${libdir}/${tccdir}"
|
||||||
|
else
|
||||||
|
tccdir="${libdir}"
|
||||||
|
fi
|
||||||
|
if test "$cpu" = "x86-64"; then
|
||||||
|
libdir="${execprefix}/lib64"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
tccdir="${libdir}/${tccdir}"
|
||||||
fi
|
fi
|
||||||
if test x"$bindir" = x""; then
|
if test x"$bindir" = x""; then
|
||||||
bindir="${execprefix}/bin"
|
bindir="${execprefix}/bin"
|
||||||
fi
|
fi
|
||||||
if test x"$tccdir" = x""; then
|
|
||||||
tccdir="tcc"
|
|
||||||
fi
|
|
||||||
if test x"$docdir" = x""; then
|
if test x"$docdir" = x""; then
|
||||||
docdir="${sharedir}/doc/${tccdir}"
|
docdir="${sharedir}/doc/${tccdir}"
|
||||||
fi
|
fi
|
||||||
@ -255,7 +265,6 @@ else
|
|||||||
if test x"$infodir" = x""; then
|
if test x"$infodir" = x""; then
|
||||||
infodir="${sharedir}/info"
|
infodir="${sharedir}/info"
|
||||||
fi
|
fi
|
||||||
tccdir="${libdir}/${tccdir}"
|
|
||||||
fi # mingw32
|
fi # mingw32
|
||||||
|
|
||||||
if test x"$includedir" = x""; then
|
if test x"$includedir" = x""; then
|
||||||
@ -325,7 +334,7 @@ if test -z "$cross_prefix" ; then
|
|||||||
if test -f "/usr/lib/$triplet/crti.o" ; then
|
if test -f "/usr/lib/$triplet/crti.o" ; then
|
||||||
tcc_lddir="lib"
|
tcc_lddir="lib"
|
||||||
multiarch_triplet="$triplet"
|
multiarch_triplet="$triplet"
|
||||||
elif test -f "/usr/lib64/crti.o" ; then
|
elif test "$cpu" != "x86" -a -f "/usr/lib64/crti.o" ; then
|
||||||
tcc_lddir="lib64"
|
tcc_lddir="lib64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -363,6 +372,11 @@ else
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# a final configuration tuning
|
||||||
|
W_PRESENT="$($cc -v --help 2>&1 | grep deprecated-declarations)"
|
||||||
|
if test -n "$W_PRESENT"; then cc="$cc -Wno-deprecated-declarations"; fi
|
||||||
|
if test -z "$tcc_lddir" -a "$cpu" = "x86-64"; then tcc_lddir="lib64"; fi
|
||||||
|
|
||||||
echo "Binary directory $bindir"
|
echo "Binary directory $bindir"
|
||||||
echo "TinyCC directory $tccdir"
|
echo "TinyCC directory $tccdir"
|
||||||
echo "Library directory $libdir"
|
echo "Library directory $libdir"
|
||||||
@ -424,11 +438,11 @@ echo "/* Automatically generated by configure - do not modify */" > $TMPH
|
|||||||
|
|
||||||
print_inc CONFIG_SYSROOT "$sysroot"
|
print_inc CONFIG_SYSROOT "$sysroot"
|
||||||
print_inc CONFIG_TCCDIR "$tccdir"
|
print_inc CONFIG_TCCDIR "$tccdir"
|
||||||
|
print_inc CONFIG_LDDIR "$tcc_lddir"
|
||||||
print_mak CONFIG_TCC_SYSINCLUDEPATHS "$tcc_sysincludepaths"
|
print_mak CONFIG_TCC_SYSINCLUDEPATHS "$tcc_sysincludepaths"
|
||||||
print_mak CONFIG_TCC_LIBPATHS "$tcc_libpaths"
|
print_mak CONFIG_TCC_LIBPATHS "$tcc_libpaths"
|
||||||
print_mak CONFIG_TCC_CRTPREFIX "$tcc_crtprefix"
|
print_mak CONFIG_TCC_CRTPREFIX "$tcc_crtprefix"
|
||||||
print_mak CONFIG_TCC_ELFINTERP "$tcc_elfinterp"
|
print_mak CONFIG_TCC_ELFINTERP "$tcc_elfinterp"
|
||||||
print_mak CONFIG_LDDIR "$tcc_lddir"
|
|
||||||
print_mak CONFIG_MULTIARCHDIR "$multiarch_triplet"
|
print_mak CONFIG_MULTIARCHDIR "$multiarch_triplet"
|
||||||
|
|
||||||
echo "#define GCC_MAJOR $gcc_major" >> $TMPH
|
echo "#define GCC_MAJOR $gcc_major" >> $TMPH
|
||||||
|
Loading…
Reference in New Issue
Block a user