Unified · Split
| @@ -970,15 +970,9 @@ LIBTCCAPI TCCState *tcc_new(void) · 969 unmodified lines | |||
| 970 | 970 | ||
| 971 | #ifndef TCC_TARGET_PE | 971 | #ifndef TCC_TARGET_PE |
| 972 | /* default library paths */ | 972 | /* default library paths */ |
| 973 | # if defined(TCC_TARGET_X86_64_CENTOS) | 973 | tcc_add_library_path(s, CONFIG_TCC_CRT_PREFIX); |
| 974 | tcc_add_library_path(s, CONFIG_SYSROOT "/usr/lib64"); | 974 | tcc_add_library_path(s, CONFIG_TCC_LDDIR); |
| 975 | tcc_add_library_path(s, CONFIG_SYSROOT "/lib64"); | 975 | tcc_add_library_path(s, CONFIG_SYSROOT "/usr/local"CONFIG_TCC_LDDIR); |
| 976 | tcc_add_library_path(s, CONFIG_SYSROOT "/usr/local/lib64"); | ||
| 977 | # else | ||
| 978 | tcc_add_library_path(s, CONFIG_SYSROOT "/usr/lib"); | ||
| 979 | tcc_add_library_path(s, CONFIG_SYSROOT "/lib"); | ||
| 980 | tcc_add_library_path(s, CONFIG_SYSROOT "/usr/local/lib"); | ||
| 981 | # endif | ||
| 982 | #endif | 976 | #endif |
| 983 | 977 | ||
| 984 | /* no section zero */ | 978 | /* no section zero */ |
| @@ -140,10 +140,13 @@ typedef int BOOL; · 139 unmodified lines | |||
| 140 | 140 | ||
| 141 | /* path to find crt1.o, crti.o and crtn.o. Only needed when generating | 141 | /* path to find crt1.o, crti.o and crtn.o. Only needed when generating |
| 142 | executables or dlls */ | 142 | executables or dlls */ |
| 143 | |||
| 143 | #if defined(TCC_TARGET_X86_64_CENTOS) | 144 | #if defined(TCC_TARGET_X86_64_CENTOS) |
| 144 | # define CONFIG_TCC_CRT_PREFIX CONFIG_SYSROOT "/usr/lib64" | 145 | # define CONFIG_TCC_CRT_PREFIX CONFIG_SYSROOT "/usr/lib64" |
| 146 | # define CONFIG_TCC_LDDIR "/lib64" | ||
| 145 | #else | 147 | #else |
| 146 | # define CONFIG_TCC_CRT_PREFIX CONFIG_SYSROOT "/usr/lib" | 148 | # define CONFIG_TCC_CRT_PREFIX CONFIG_SYSROOT "/usr/lib" |
| 149 | # define CONFIG_TCC_LDDIR "/lib" | ||
| 147 | #endif | 150 | #endif |
| 148 | 151 | ||
| 149 | #define INCLUDE_STACK_SIZE 32 | 152 | #define INCLUDE_STACK_SIZE 32 |
| @@ -1251,7 +1251,7 @@ ST_FUNC void tcc_add_runtime(TCCState *s1) · 1250 unmodified lines | |||
| 1251 | if (!s1->nostdlib) { | 1251 | if (!s1->nostdlib) { |
| 1252 | #ifdef CONFIG_USE_LIBGCC | 1252 | #ifdef CONFIG_USE_LIBGCC |
| 1253 | tcc_add_library(s1, "c"); | 1253 | tcc_add_library(s1, "c"); |
| 1254 | tcc_add_file(s1, CONFIG_SYSROOT "/lib/libgcc_s.so.1"); | 1254 | tcc_add_file(s1, CONFIG_TCC_LDDIR"/libgcc_s.so.1"); |
| 1255 | #else | 1255 | #else |
| 1256 | tcc_add_library(s1, "c"); | 1256 | tcc_add_library(s1, "c"); |
| 1257 | #ifndef WITHOUT_LIBTCC | 1257 | #ifndef WITHOUT_LIBTCC |
| @@ -1337,11 +1337,7 @@ static char elf_interp[] = "/lib/ld.so.1"; · 79 unmodified lines | |||
| 1337 | #elif defined TCC_ARM_EABI | 1337 | #elif defined TCC_ARM_EABI |
| 1338 | static const char elf_interp[] = "/lib/ld-linux.so.3"; | 1338 | static const char elf_interp[] = "/lib/ld-linux.so.3"; |
| 1339 | #elif defined(TCC_TARGET_X86_64) | 1339 | #elif defined(TCC_TARGET_X86_64) |
| 1340 | # if defined(TCC_TARGET_X86_64_CENTOS) | 1340 | static const char elf_interp[] = CONFIG_TCC_LDDIR"/ld-linux-x86-64.so.2"; |
| 1341 | static const char elf_interp[] = "/lib64/ld-linux-x86-64.so.2"; | ||
| 1342 | # else | ||
| 1343 | static const char elf_interp[] = "/lib/ld-linux-x86-64.so.2"; | ||
| 1344 | # endif /* TCC_TARGET_X86_64_CENTOS */ | ||
| 1345 | #elif defined(TCC_UCLIBC) | 1341 | #elif defined(TCC_UCLIBC) |
| 1346 | static const char elf_interp[] = "/lib/ld-uClibc.so.0"; | 1342 | static const char elf_interp[] = "/lib/ld-uClibc.so.0"; |
| 1347 | #else | 1343 | #else |