Check-in [84c0812a1d]
Overview
Comment:Updated to search library_paths for libtcc1.a for ELF as is done for PE
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 84c0812a1deb22f6e57cd2c84bbdb3f65f30d0ae
User & Date: rkeene on 2014-05-04 04:27:14
Other Links: manifest | tags
Context
2014-05-04
07:02
Removed spurious information from patch check-in: b3f189ad77 user: rkeene tags: trunk
04:27
Updated to search library_paths for libtcc1.a for ELF as is done for PE check-in: 84c0812a1d user: rkeene tags: trunk
04:26
Updated to set tcc_lib_path sooner, needed for setting library_paths correctly check-in: 9e75cf906d user: rkeene tags: trunk
Changes

Added build/tcc-patches/0.9.26/tcc-0.9.26-elfsearchforlibtcc.diff version [b6acadb6da].

            1  +Binary files tcc-0.9.26.orig/.tccelf.c.swp and tcc-0.9.26-1elfsearchforlibtcc/.tccelf.c.swp differ
            2  +diff -uNr tcc-0.9.26.orig/tccelf.c tcc-0.9.26-1elfsearchforlibtcc/tccelf.c
            3  +--- tcc-0.9.26.orig/tccelf.c	2013-02-15 08:24:00.000000000 -0600
            4  ++++ tcc-0.9.26-1elfsearchforlibtcc/tccelf.c	2014-05-03 23:24:08.325640003 -0500
            5  +@@ -1349,7 +1349,27 @@
            6  + static inline int tcc_add_support(TCCState *s1, const char *filename)
            7  + {
            8  +     char buf[1024];
            9  ++    char *path;
           10  ++    void *check;
           11  ++    int i;
           12  ++
           13  +     snprintf(buf, sizeof(buf), "%s/%s", s1->tcc_lib_path, filename);
           14  ++    check = tcc_open(s1, buf);
           15  ++    if (check != NULL) {
           16  ++        tcc_close();
           17  ++    } else {
           18  ++        for (i = 0; i < s1->nb_library_paths; i++) {
           19  ++            path = s1->library_paths[i];
           20  ++            snprintf(buf, sizeof(buf), "%s/%s", path, filename);
           21  ++            check = tcc_open(s1, buf);
           22  ++
           23  ++            if (check != NULL) {
           24  ++                tcc_close();
           25  ++                break;
           26  ++            }
           27  ++        }
           28  ++    }
           29  ++
           30  +     return tcc_add_file(s1, buf);
           31  + }
           32  + 

Modified tcc4tcl.tcl from [cf29842e65] to [3b40b22f76].

    91     91     Log "INJECTING CCODE"
    92     92     append tcc(code) $code \n
    93     93   }
    94     94   proc ::tcc4tcl::cc {code} {
    95     95     variable tcc
    96     96     if {![info exists tcc(cc)]} {
    97     97         set tcc(cc) tcc1
    98         -      tcc4tcl [file join $::tcc4tcl::dir lib] $tcc(cc)
           98  +      tcc4tcl $::tcc4tcl::dir $tcc(cc)
    99     99         $tcc(cc) add_library tcl8.5
   100    100         $tcc(cc) add_include_path [file join $::tcc4tcl::dir include]
   101    101     }
   102    102     Log code:$code
   103    103     $tcc(cc) compile $code
   104    104   }
   105    105   #----------------------------------------------------------- New DLL API