History

x86_64: fix --with-libgcc and simplify biarch paths

Henry Kroll III committed 15 years ago

Commit f1c9f641 parent 9036c183 files · +8 −15Browse files

Unified · Split

3 files
  1. libtcc.c +3 −9
  2. tcc.h +3 −0
  3. tccelf.c +2 −6
libtcc.c+3−9
@@ -970,15 +970,9 @@ LIBTCCAPI TCCState *tcc_new(void) · 969 unmodified lines
970 970
971#ifndef TCC_TARGET_PE971#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#endif976#endif
983 977
984 /* no section zero */978 /* no section zero */
tcc.h+3−0
@@ -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 generating141/* 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#else147#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#endif150#endif
148 151
149#define INCLUDE_STACK_SIZE 32152#define INCLUDE_STACK_SIZE 32
tccelf.c+2−6
@@ -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_LIBGCC1252#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#else1255#else
1256 tcc_add_library(s1, "c");1256 tcc_add_library(s1, "c");
1257#ifndef WITHOUT_LIBTCC1257#ifndef WITHOUT_LIBTCC
@@ -1337,11 +1337,7 @@ static char elf_interp[] = "/lib/ld.so.1"; · 79 unmodified lines
1337#elif defined TCC_ARM_EABI1337#elif defined TCC_ARM_EABI
1338static const char elf_interp[] = "/lib/ld-linux.so.3";1338static 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)1340static const char elf_interp[] = CONFIG_TCC_LDDIR"/ld-linux-x86-64.so.2";
1341static const char elf_interp[] = "/lib64/ld-linux-x86-64.so.2";
1342# else
1343static 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)
1346static const char elf_interp[] = "/lib/ld-uClibc.so.0";1342static const char elf_interp[] = "/lib/ld-uClibc.so.0";
1347#else1343#else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t