mirror of
https://github.com/mirror/tinycc.git
synced 2025-04-27 14:10:23 +08:00
Fix lib, include, crt and libgcc search paths
This commit is contained in:
parent
73faaea227
commit
9382d6f1a0
2
configure
vendored
2
configure
vendored
@ -304,7 +304,7 @@ if test -z "$cross_prefix" ; then
|
|||||||
if test "$mingw32" = "no" ; then
|
if test "$mingw32" = "no" ; then
|
||||||
triplet="$($CONFTEST triplet)"
|
triplet="$($CONFTEST triplet)"
|
||||||
if test -f "/usr/lib/$triplet/crti.o" ; then
|
if test -f "/usr/lib/$triplet/crti.o" ; then
|
||||||
tcc_lddir="lib/$triplet"
|
tcc_lddir="lib"
|
||||||
multiarch_triplet="$triplet"
|
multiarch_triplet="$triplet"
|
||||||
elif test -f "/usr/lib64/crti.o" ; then
|
elif test -f "/usr/lib64/crti.o" ; then
|
||||||
tcc_lddir="lib64"
|
tcc_lddir="lib64"
|
||||||
|
23
tcc.h
23
tcc.h
@ -168,10 +168,13 @@
|
|||||||
#ifndef CONFIG_LDDIR
|
#ifndef CONFIG_LDDIR
|
||||||
# define CONFIG_LDDIR "lib"
|
# define CONFIG_LDDIR "lib"
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef CONFIG_MULTIARCHDIR
|
||||||
|
#define CONFIG_MULTIARCHDIR
|
||||||
|
#endif
|
||||||
|
|
||||||
/* path to find crt1.o, crti.o and crtn.o */
|
/* path to find crt1.o, crti.o and crtn.o */
|
||||||
#ifndef CONFIG_TCC_CRTPREFIX
|
#ifndef CONFIG_TCC_CRTPREFIX
|
||||||
# define CONFIG_TCC_CRTPREFIX CONFIG_SYSROOT "/usr/" CONFIG_LDDIR
|
# define CONFIG_TCC_CRTPREFIX CONFIG_SYSROOT "/usr/" CONFIG_LDDIR "/" CONFIG_MULTIARCHDIR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Below: {B} is substituted by CONFIG_TCCDIR (rsp. -B option) */
|
/* Below: {B} is substituted by CONFIG_TCCDIR (rsp. -B option) */
|
||||||
@ -180,16 +183,11 @@
|
|||||||
#ifndef CONFIG_TCC_SYSINCLUDEPATHS
|
#ifndef CONFIG_TCC_SYSINCLUDEPATHS
|
||||||
# ifdef TCC_TARGET_PE
|
# ifdef TCC_TARGET_PE
|
||||||
# define CONFIG_TCC_SYSINCLUDEPATHS "{B}/include;{B}/include/winapi"
|
# define CONFIG_TCC_SYSINCLUDEPATHS "{B}/include;{B}/include/winapi"
|
||||||
# elif defined CONFIG_MULTIARCHDIR
|
|
||||||
# define CONFIG_TCC_SYSINCLUDEPATHS \
|
|
||||||
CONFIG_SYSROOT "/usr/local/include" \
|
|
||||||
":" CONFIG_SYSROOT "/usr/local/include/" CONFIG_MULTIARCHDIR \
|
|
||||||
":" CONFIG_SYSROOT "/usr/include" \
|
|
||||||
":" CONFIG_SYSROOT "/usr/include/" CONFIG_MULTIARCHDIR \
|
|
||||||
":" "{B}/include"
|
|
||||||
# else
|
# else
|
||||||
# define CONFIG_TCC_SYSINCLUDEPATHS \
|
# define CONFIG_TCC_SYSINCLUDEPATHS \
|
||||||
CONFIG_SYSROOT "/usr/local/include" \
|
":" CONFIG_SYSROOT "/usr/local/include/" CONFIG_MULTIARCHDIR \
|
||||||
|
":" CONFIG_SYSROOT "/usr/local/include" \
|
||||||
|
":" CONFIG_SYSROOT "/usr/include/" CONFIG_MULTIARCHDIR \
|
||||||
":" CONFIG_SYSROOT "/usr/include" \
|
":" CONFIG_SYSROOT "/usr/include" \
|
||||||
":" "{B}/include"
|
":" "{B}/include"
|
||||||
# endif
|
# endif
|
||||||
@ -201,8 +199,11 @@
|
|||||||
# define CONFIG_TCC_LIBPATHS "{B}/lib;{B}"
|
# define CONFIG_TCC_LIBPATHS "{B}/lib;{B}"
|
||||||
# else
|
# else
|
||||||
# define CONFIG_TCC_LIBPATHS \
|
# define CONFIG_TCC_LIBPATHS \
|
||||||
CONFIG_SYSROOT "/usr/" CONFIG_LDDIR \
|
CONFIG_SYSROOT "/usr/" CONFIG_LDDIR "/" CONFIG_MULTIARCHDIR \
|
||||||
|
":" CONFIG_SYSROOT "/usr/" CONFIG_LDDIR \
|
||||||
|
":" CONFIG_SYSROOT "/" CONFIG_LDDIR "/" CONFIG_MULTIARCHDIR \
|
||||||
":" CONFIG_SYSROOT "/" CONFIG_LDDIR \
|
":" CONFIG_SYSROOT "/" CONFIG_LDDIR \
|
||||||
|
":" CONFIG_SYSROOT "/usr/local/" CONFIG_LDDIR "/" CONFIG_MULTIARCHDIR \
|
||||||
":" CONFIG_SYSROOT "/usr/local/" CONFIG_LDDIR
|
":" CONFIG_SYSROOT "/usr/local/" CONFIG_LDDIR
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@ -235,7 +236,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* library to use with CONFIG_USE_LIBGCC instead of libtcc1.a */
|
/* library to use with CONFIG_USE_LIBGCC instead of libtcc1.a */
|
||||||
#define TCC_LIBGCC CONFIG_SYSROOT "/" CONFIG_LDDIR "/libgcc_s.so.1"
|
#define TCC_LIBGCC CONFIG_SYSROOT "/" CONFIG_LDDIR "/" CONFIG_MULTIARCHDIR "/libgcc_s.so.1"
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* include the target specific definitions */
|
/* include the target specific definitions */
|
||||||
|
Loading…
Reference in New Issue
Block a user