ADDED build/tcc-patches/0.9.26/tcc-0.9.26-android.diff Index: build/tcc-patches/0.9.26/tcc-0.9.26-android.diff ================================================================== --- build/tcc-patches/0.9.26/tcc-0.9.26-android.diff +++ build/tcc-patches/0.9.26/tcc-0.9.26-android.diff @@ -0,0 +1,37 @@ +diff -uNr tcc-0.9.26.orig/tcc.h tcc-0.9.26-1android/tcc.h +--- tcc-0.9.26.orig/tcc.h 2013-02-15 08:24:00.000000000 -0600 ++++ tcc-0.9.26-1android/tcc.h 2014-05-16 23:38:17.599016999 -0500 +@@ -43,7 +43,9 @@ + #ifndef _WIN32 + # include + # include +-# include ++# ifndef __ANDROID__ ++# include ++# endif /* __ANDROID__ */ + # include + # ifndef CONFIG_TCC_STATIC + # include +@@ -146,7 +148,7 @@ + # endif + #endif + +-#if defined TCC_IS_NATIVE && !defined CONFIG_TCCBOOT ++#if defined TCC_IS_NATIVE && !defined CONFIG_TCCBOOT && !defined __ANDROID__ + # define CONFIG_TCC_BACKTRACE + #endif + +diff -uNr tcc-0.9.26.orig/tccrun.c tcc-0.9.26-1android/tccrun.c +--- tcc-0.9.26.orig/tccrun.c 2013-02-15 08:24:00.000000000 -0600 ++++ tcc-0.9.26-1android/tccrun.c 2014-05-16 23:38:36.949016999 -0500 +@@ -35,8 +35,10 @@ + + static void set_pages_executable(void *ptr, unsigned long length); + static void set_exception_handler(void); ++#ifdef CONFIG_TCC_BACKTRACE + static int rt_get_caller_pc(addr_t *paddr, ucontext_t *uc, int level); + static void rt_error(ucontext_t *uc, const char *fmt, ...); ++#endif + static int tcc_relocate_ex(TCCState *s1, void *ptr); + + #ifdef _WIN64 ADDED build/tcc-patches/0.9.26/tcc-0.9.26-disablebcheck.diff Index: build/tcc-patches/0.9.26/tcc-0.9.26-disablebcheck.diff ================================================================== --- build/tcc-patches/0.9.26/tcc-0.9.26-disablebcheck.diff +++ build/tcc-patches/0.9.26/tcc-0.9.26-disablebcheck.diff @@ -0,0 +1,11 @@ +diff -uNr tcc-0.9.26.orig/lib/bcheck.c tcc-0.9.26-1disablebcheck/lib/bcheck.c +--- tcc-0.9.26.orig/lib/bcheck.c 2013-02-15 08:24:00.000000000 -0600 ++++ tcc-0.9.26-1disablebcheck/lib/bcheck.c 2014-05-16 22:58:34.829016999 -0500 +@@ -42,6 +42,7 @@ + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \ + || defined(__DragonFly__) || defined(__dietlibc__) \ + || defined(__UCLIBC__) || defined(__OpenBSD__) \ ++ || (defined(__sun) && defined(__SVR4)) \ + || defined(_WIN32) || defined(TCC_UCLIBC) + #warning Bound checking does not support malloc (etc.) in this environment. + #undef CONFIG_TCC_MALLOC_HOOKS Index: headers.awk ================================================================== --- headers.awk +++ headers.awk @@ -2,11 +2,11 @@ file = $3; gsub(/^"/, "", file); gsub(/"$/, "", file); - while(gsub(/\/[^\/]*\/\.\.\//, "/", file)) {} + while(sub(/\/\/*[^\/]*\/\.\.\/\/*/, "/", file)) {} destfile = file; if (!gsub(/^.*\/gcc\/.*\/include\//, "gcc/", destfile)) { if (!gsub(/^.*\/include\//, "", destfile)) { if (!gsub(/^.*\/include-fixed\//, "fix/", destfile)) {