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:
seyko 2015-03-04 10:57:13 +03:00
parent 7ec39e2288
commit 7ed4341538

28
configure vendored
View File

@ -237,15 +237,25 @@ else
if test x"$execprefix" = x""; then
execprefix="${prefix}"
fi
if test x"$tccdir" = x""; then
tccdir="tcc"
fi
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
if test x"$bindir" = x""; then
bindir="${execprefix}/bin"
fi
if test x"$tccdir" = x""; then
tccdir="tcc"
fi
if test x"$docdir" = x""; then
docdir="${sharedir}/doc/${tccdir}"
fi
@ -255,7 +265,6 @@ else
if test x"$infodir" = x""; then
infodir="${sharedir}/info"
fi
tccdir="${libdir}/${tccdir}"
fi # mingw32
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
tcc_lddir="lib"
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"
fi
@ -363,6 +372,11 @@ else
esac
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 "TinyCC directory $tccdir"
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_TCCDIR "$tccdir"
print_inc CONFIG_LDDIR "$tcc_lddir"
print_mak CONFIG_TCC_SYSINCLUDEPATHS "$tcc_sysincludepaths"
print_mak CONFIG_TCC_LIBPATHS "$tcc_libpaths"
print_mak CONFIG_TCC_CRTPREFIX "$tcc_crtprefix"
print_mak CONFIG_TCC_ELFINTERP "$tcc_elfinterp"
print_mak CONFIG_LDDIR "$tcc_lddir"
print_mak CONFIG_MULTIARCHDIR "$multiarch_triplet"
echo "#define GCC_MAJOR $gcc_major" >> $TMPH