* 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.
Unified · Split
| @@ -237,15 +237,25 @@ else · 236 unmodified lines | |||
| 237 | if test x"$execprefix" = x""; then | 237 | if test x"$execprefix" = x""; then |
| 238 | execprefix="${prefix}" | 238 | execprefix="${prefix}" |
| 239 | fi | 239 | fi |
| 240 | if test x"$tccdir" = x""; then | ||
| 241 | tccdir="tcc" | ||
| 242 | fi | ||
| 240 | if test x"$libdir" = x""; then | 243 | if test x"$libdir" = x""; then |
| 241 | libdir="${execprefix}/lib" | 244 | libdir="${execprefix}/lib" |
| 245 | if test -n "${tccdir}"; then | ||
| 246 | tccdir="${libdir}/${tccdir}" | ||
| 247 | else | ||
| 248 | tccdir="${libdir}" | ||
| 249 | fi | ||
| 250 | if test "$cpu" = "x86-64"; then | ||
| 251 | libdir="${execprefix}/lib64" | ||
| 252 | fi | ||
| 253 | else | ||
| 254 | tccdir="${libdir}/${tccdir}" | ||
| 242 | fi | 255 | fi |
| 243 | if test x"$bindir" = x""; then | 256 | if test x"$bindir" = x""; then |
| 244 | bindir="${execprefix}/bin" | 257 | bindir="${execprefix}/bin" |
| 245 | fi | 258 | fi |
| 246 | if test x"$tccdir" = x""; then | ||
| 247 | tccdir="tcc" | ||
| 248 | fi | ||
| 249 | if test x"$docdir" = x""; then | 259 | if test x"$docdir" = x""; then |
| 250 | docdir="${sharedir}/doc/${tccdir}" | 260 | docdir="${sharedir}/doc/${tccdir}" |
| 251 | fi | 261 | fi |
| @@ -255,7 +265,6 @@ else · 3 unmodified lines | |||
| 255 | if test x"$infodir" = x""; then | 265 | if test x"$infodir" = x""; then |
| 256 | infodir="${sharedir}/info" | 266 | infodir="${sharedir}/info" |
| 257 | fi | 267 | fi |
| 258 | tccdir="${libdir}/${tccdir}" | ||
| 259 | fi # mingw32 | 268 | fi # mingw32 |
| 260 | 269 | ||
| 261 | if test x"$includedir" = x""; then | 270 | if test x"$includedir" = x""; then |
| @@ -325,7 +334,7 @@ if test -z "$cross_prefix" ; then · 63 unmodified lines | |||
| 325 | if test -f "/usr/lib/$triplet/crti.o" ; then | 334 | if test -f "/usr/lib/$triplet/crti.o" ; then |
| 326 | tcc_lddir="lib" | 335 | tcc_lddir="lib" |
| 327 | multiarch_triplet="$triplet" | 336 | multiarch_triplet="$triplet" |
| 328 | elif test -f "/usr/lib64/crti.o" ; then | 337 | elif test "$cpu" != "x86" -a -f "/usr/lib64/crti.o" ; then |
| 329 | tcc_lddir="lib64" | 338 | tcc_lddir="lib64" |
| 330 | fi | 339 | fi |
| 331 | 340 | ||
| @@ -363,6 +372,11 @@ else · 31 unmodified lines | |||
| 363 | esac | 372 | esac |
| 364 | fi | 373 | fi |
| 365 | 374 | ||
| 375 | # a final configuration tuning | ||
| 376 | W_PRESENT="$($cc -v --help 2>&1 | grep deprecated-declarations)" | ||
| 377 | if test -n "$W_PRESENT"; then cc="$cc -Wno-deprecated-declarations"; fi | ||
| 378 | if test -z "$tcc_lddir" -a "$cpu" = "x86-64"; then tcc_lddir="lib64"; fi | ||
| 379 | |||
| 366 | echo "Binary directory $bindir" | 380 | echo "Binary directory $bindir" |
| 367 | echo "TinyCC directory $tccdir" | 381 | echo "TinyCC directory $tccdir" |
| 368 | echo "Library directory $libdir" | 382 | echo "Library directory $libdir" |
| @@ -424,11 +438,11 @@ echo "/* Automatically generated by configure - do not modify */" > $TMPH · 55 unmodified lines | |||
| 424 | 438 | ||
| 425 | print_inc CONFIG_SYSROOT "$sysroot" | 439 | print_inc CONFIG_SYSROOT "$sysroot" |
| 426 | print_inc CONFIG_TCCDIR "$tccdir" | 440 | print_inc CONFIG_TCCDIR "$tccdir" |
| 441 | print_inc CONFIG_LDDIR "$tcc_lddir" | ||
| 427 | print_mak CONFIG_TCC_SYSINCLUDEPATHS "$tcc_sysincludepaths" | 442 | print_mak CONFIG_TCC_SYSINCLUDEPATHS "$tcc_sysincludepaths" |
| 428 | print_mak CONFIG_TCC_LIBPATHS "$tcc_libpaths" | 443 | print_mak CONFIG_TCC_LIBPATHS "$tcc_libpaths" |
| 429 | print_mak CONFIG_TCC_CRTPREFIX "$tcc_crtprefix" | 444 | print_mak CONFIG_TCC_CRTPREFIX "$tcc_crtprefix" |
| 430 | print_mak CONFIG_TCC_ELFINTERP "$tcc_elfinterp" | 445 | print_mak CONFIG_TCC_ELFINTERP "$tcc_elfinterp" |
| 431 | print_mak CONFIG_LDDIR "$tcc_lddir" | ||
| 432 | print_mak CONFIG_MULTIARCHDIR "$multiarch_triplet" | 446 | print_mak CONFIG_MULTIARCHDIR "$multiarch_triplet" |
| 433 | 447 | ||
| 434 | echo "#define GCC_MAJOR $gcc_major" >> $TMPH | 448 | echo "#define GCC_MAJOR $gcc_major" >> $TMPH |