Check-in [c3a3ac9cbf]
Overview
Comment:Updated to not try to use dlopen() on PE platforms
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c3a3ac9cbf600ca2cff56b64ff53c4f92072067c
User & Date: rkeene on 2014-06-23 20:29:54
Other Links: manifest | tags
Context
2014-06-23
20:31
Updated to not do curl tests if cross-compiling check-in: a6c35050af user: rkeene tags: trunk
20:29
Updated to not try to use dlopen() on PE platforms check-in: c3a3ac9cbf user: rkeene tags: trunk
20:12
tcc4tcl 0.21 check-in: 7c6bbf8a11 user: rkeene tags: trunk, 0.21
Changes

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

            1  +Binary files tcc-0.9.26.orig/.libtcc.c.swp and tcc-0.9.26-1sharedlibfix/.libtcc.c.swp differ
     1      2   diff -uNr tcc-0.9.26.orig/libtcc.c tcc-0.9.26-1sharedlibfix/libtcc.c
     2      3   --- tcc-0.9.26.orig/libtcc.c	2013-02-15 08:24:00.000000000 -0600
     3         -+++ tcc-0.9.26-1sharedlibfix/libtcc.c	2014-06-23 14:34:51.289507000 -0500
     4         -@@ -1189,6 +1189,18 @@
            4  ++++ tcc-0.9.26-1sharedlibfix/libtcc.c	2014-06-23 15:29:04.679507000 -0500
            5  +@@ -1189,6 +1189,20 @@
     5      6    #endif
     6      7            tcc_error_noabort("unrecognized ELF file");
     7      8            goto the_end;
     8      9   +    } else {
     9     10   +#ifdef TCC_IS_NATIVE
           11  ++#ifndef TCC_TARGET_PE
    10     12   +        if (s1->output_type == TCC_OUTPUT_MEMORY) {
    11     13   +            /* If it's not an ELF file, but dlopen() can open it, do that. */
    12     14   +            void *h;
    13     15   +            h = dlopen(filename, RTLD_GLOBAL | RTLD_LAZY);
    14     16   +            if (h) {
    15     17   +                ret = 0;
    16     18   +                goto the_end;
    17     19   +            }
    18     20   +        }
    19     21   +#endif
           22  ++#endif
    20     23        }
    21     24    
    22     25        if (memcmp((char *)&ehdr, ARMAG, 8) == 0) {
    23         -@@ -1269,7 +1281,15 @@
           26  +@@ -1269,7 +1283,15 @@
    24     27        const char *libs[] = { "%s/%s.def", "%s/lib%s.def", "%s/%s.dll", "%s/lib%s.dll", "%s/lib%s.a", NULL };
    25     28        const char **pp = s->static_link ? libs + 4 : libs;
    26     29    #else
    27     30   +#  ifdef SHOBJEXT
    28     31   +#    define str1(s) str2(s)
    29     32   +#    define str2(s) #s
    30     33   +    const char *libs[] = { "%s/lib%s." str1(SHOBJEXT), "%s/lib%s.a", NULL };