Check-in [3b13ded611]
Overview
Comment:Fixed patch for searching based on current platform shared object name
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3b13ded611432a47e0d4b32da30e81a7789a6476
User & Date: rkeene on 2014-06-23 19:35:28
Other Links: manifest | tags
Context
2014-06-23
19:37
Updated to include memory-linking tests on Darwin check-in: 7dafc6aec5 user: rkeene tags: trunk
19:35
Fixed patch for searching based on current platform shared object name check-in: 3b13ded611 user: rkeene tags: trunk
19:32
Updated to work harder to load shared objects (that are not ELF) check-in: c32ff7df22 user: rkeene tags: trunk
Changes

Modified build/tcc-patches/0.9.26/tcc-0.9.26-sharedlibfix.diff from [82e03e9dec] to [28e54aa43c].

1
2
3
4
5
6
7
8
9
10
..
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff -uNr tcc-0.9.26.orig/libtcc.c tcc-0.9.26-1sharedlibfix/libtcc.c
--- tcc-0.9.26.orig/libtcc.c	2013-02-15 08:24:00.000000000 -0600
+++ tcc-0.9.26-1sharedlibfix/libtcc.c	2014-06-23 14:18:02.279507000 -0500
@@ -1189,6 +1189,18 @@
 #endif
         tcc_error_noabort("unrecognized ELF file");
         goto the_end;
+    } else {
+#ifdef TCC_IS_NATIVE
+        if (s1->output_type == TCC_OUTPUT_MEMORY) {
................................................................................
@@ -1269,7 +1281,15 @@
     const char *libs[] = { "%s/%s.def", "%s/lib%s.def", "%s/%s.dll", "%s/lib%s.dll", "%s/lib%s.a", NULL };
     const char **pp = s->static_link ? libs + 4 : libs;
 #else
+#  ifdef SHOBJEXT
+#    define str1(s) str2(s)
+#    define str2(s) #s
+    const char *libs[] = { "%s/lib%s" str1(SHOBJEXT), "%s/lib%s.a", NULL };
+#    undef str1
+#    undef str2
+#  else
     const char *libs[] = { "%s/lib%s.so", "%s/lib%s.a", NULL };
+#  endif
     const char **pp = s->static_link ? libs + 1 : libs;
 #endif
     while (*pp) {


|







 







|








1
2
3
4
5
6
7
8
9
10
..
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff -uNr tcc-0.9.26.orig/libtcc.c tcc-0.9.26-1sharedlibfix/libtcc.c
--- tcc-0.9.26.orig/libtcc.c	2013-02-15 08:24:00.000000000 -0600
+++ tcc-0.9.26-1sharedlibfix/libtcc.c	2014-06-23 14:34:51.289507000 -0500
@@ -1189,6 +1189,18 @@
 #endif
         tcc_error_noabort("unrecognized ELF file");
         goto the_end;
+    } else {
+#ifdef TCC_IS_NATIVE
+        if (s1->output_type == TCC_OUTPUT_MEMORY) {
................................................................................
@@ -1269,7 +1281,15 @@
     const char *libs[] = { "%s/%s.def", "%s/lib%s.def", "%s/%s.dll", "%s/lib%s.dll", "%s/lib%s.a", NULL };
     const char **pp = s->static_link ? libs + 4 : libs;
 #else
+#  ifdef SHOBJEXT
+#    define str1(s) str2(s)
+#    define str2(s) #s
+    const char *libs[] = { "%s/lib%s." str1(SHOBJEXT), "%s/lib%s.a", NULL };
+#    undef str1
+#    undef str2
+#  else
     const char *libs[] = { "%s/lib%s.so", "%s/lib%s.a", NULL };
+#  endif
     const char **pp = s->static_link ? libs + 1 : libs;
 #endif
     while (*pp) {