Index: build/tcc-patches/0.9.26/tcc-0.9.26-tcl.diff ================================================================== --- build/tcc-patches/0.9.26/tcc-0.9.26-tcl.diff +++ build/tcc-patches/0.9.26/tcc-0.9.26-tcl.diff @@ -1,8 +1,7 @@ -diff -uNr tcc-0.9.26.orig/configure tcc-0.9.26-1tcl/configure ---- tcc-0.9.26.orig/configure 2013-02-15 09:24:00.000000000 -0500 -+++ tcc-0.9.26-1tcl/configure 2014-05-05 12:35:23.109943527 -0400 +--- tcc-0.9.26.orig/configure 2013-02-15 08:24:00.000000000 -0600 ++++ tcc-0.9.26-1tcl/configure 2014-05-01 19:50:10.103740647 -0500 @@ -43,6 +43,7 @@ tcc_libpaths="" tcc_crtprefix="" tcc_elfinterp="" +tcc_tcl_path="" @@ -50,28 +49,12 @@ +fi + cat < +#endif #ifdef CONFIG_TCCBOOT #include "tccboot.h" -diff -uNr tcc-0.9.26.orig/tccrun.c tcc-0.9.26-1tcl/tccrun.c ---- tcc-0.9.26.orig/tccrun.c 2013-02-15 09:24:00.000000000 -0500 -+++ tcc-0.9.26-1tcl/tccrun.c 2014-05-05 13:06:41.105088994 -0400 -@@ -697,14 +697,17 @@ - - /* add the symbol you want here if no dynamic linking is done */ - static TCCSyms tcc_syms[] = { --#if !defined(CONFIG_TCCBOOT) - #define TCCSYM(a) { #a, &a, }, -+#if !defined(CONFIG_TCCBOOT) - TCCSYM(printf) - TCCSYM(fprintf) - TCCSYM(fopen) - TCCSYM(fclose) --#undef TCCSYM - #endif -+#ifdef USE_TCL_STUBS -+ TCCSYM(tclStubsPtr) -+#endif -+#undef TCCSYM - { NULL, NULL }, - }; - Index: tcc4tcl.c ================================================================== --- tcc4tcl.c +++ tcc4tcl.c @@ -254,10 +254,15 @@ s = tcc_new(Tcl_GetString(objv[1])); if (s == NULL) { return(TCL_ERROR); } + +#ifdef USE_TCL_STUBS + tcc_add_symbol(s, "tclStubsPtr", &tclStubsPtr); + tcc_define_symbol(s, "USE_TCL_STUBS", "1"); +#endif tcc_set_error_func(s, interp, (void *)&Tcc4tclErrorFunc); ts = (void *) ckalloc(sizeof(*ts)); ts->s = s;