diff -urN tinycc.old/configure tinycc/configure
--- tinycc.old/configure	2015-03-10 14:27:13.000000000 +0300
+++ tinycc/configure	2015-03-11 07:49:23.000000000 +0300
@@ -41,12 +41,14 @@
 LIBSUF=".a"
 EXESUF=""
 tcc_sysincludepaths=""
+tcc_sysincludepaths_addon=""
 tcc_libpaths=""
 tcc_crtprefix=""
 tcc_elfinterp=""
 tcc_lddir=
 confvars=
 cpu=
+host_cpu=
 host_os=Linux
 
 # OS specific
@@ -73,7 +75,7 @@
 
 classify_cpu ()
 {
-  cpu="$1"
+  local cpu="$1"
 
   case "$cpu" in
     x86|i386|i486|i586|i686|i86pc|BePC|i686-AT386)
@@ -119,6 +121,7 @@
       exit 1
     ;;
   esac
+  echo $cpu
 }
 
 for opt do
@@ -206,7 +209,10 @@
 	cpu=`uname -m`
     fi
 fi
-classify_cpu "$cpu"
+cpu=$(classify_cpu "$cpu")
+host_cpu=`uname -m`
+host_cpu=$(classify_cpu "$host_cpu")
+host_cpu=$(echo $host_cpu | cut -d'-' -f1)
 
 # Checking for CFLAGS
 if test -z "$CFLAGS"; then
@@ -340,10 +346,14 @@
     gcc_minor="$($CONFTEST minor)"
     if test "$mingw32" = "no" ; then
       triplet="$($CONFTEST triplet)"
+      if test "$cpu" = "x86-64"; then
+         triplet=$(echo $triplet | cut -d '-' -f2-)
+         triplet="x86_64-$(echo $triplet)"
+      fi
       if test -f "/usr/lib/$triplet/crti.o" ; then
         tcc_lddir="lib"
         multiarch_triplet="$triplet"
-      elif test "$cpu" != "x86" -a -f "/usr/lib64/crti.o" ; then
+      elif test "$cpu" == "x86-64" -a "$host_cpu" == "x86" -a -f "/usr/lib64/crti.o" ; then
         tcc_lddir="lib64"
       fi
 
@@ -361,9 +371,10 @@
 #      multiarch_triplet=${libc_dir#*/}
 #      multiarch_triplet=${multiarch_triplet%/}
 #      tcc_lddir="${libc_dir%%/*}"
-#      if test -n "$multiarch_triplet" ; then
-#        tcc_lddir="$tcc_lddir/$multiarch_triplet"
-#      fi
+      if test -n "$multiarch_triplet" ; then
+        tcc_lddir="$tcc_lddir/$multiarch_triplet"
+        tcc_sysincludepaths_addon="include/$multiarch_triplet"
+      fi
 
       if test -f "/lib/ld-uClibc.so.0" ; then
         confvars="$confvars uClibc"
@@ -465,6 +476,7 @@
 print_inc CONFIG_TCCDIR "$tccdir"
 print_inc CONFIG_LDDIR "$tcc_lddir"
 print_mak CONFIG_TCC_SYSINCLUDEPATHS "$tcc_sysincludepaths"
+print_mak CONFIG_TCC_SYSINCLUDEPATHS_ADDON "$tcc_sysincludepaths_addon"
 print_mak CONFIG_TCC_LIBPATHS "$tcc_libpaths"
 print_mak CONFIG_TCC_CRTPREFIX "$tcc_crtprefix"
 print_mak CONFIG_TCC_ELFINTERP "$tcc_elfinterp"
diff -urN tinycc.old/Makefile tinycc/Makefile
--- tinycc.old/Makefile	2015-03-10 14:27:13.000000000 +0300
+++ tinycc/Makefile	2015-03-11 10:11:14.000000000 +0300
@@ -177,7 +177,7 @@
 
 # Cross Tiny C Compilers
 %-tcc$(EXESUF): tcc.c
-	$(CC) -o $@ $< -DONE_SOURCE $(DEFINES) $(CPPFLAGS) $(CFLAGS) $(LIBS) $(LDFLAGS)
+	$(CC) -o $@ $< -DONE_SOURCE $(DEFINES) $(if $($@_TCC),$(NATIVE_DEFINES)) $(CPPFLAGS) $(CFLAGS) $(LIBS) $(LDFLAGS)
 	$(if $($@_LINK),ln -sf $@ $($@_LINK))
 	$(if $($@_TCC),ln -sf $@ tcc$(EXESUF))
 
diff -urN tinycc.old/tcc.h tinycc/tcc.h
--- tinycc.old/tcc.h	2015-03-10 14:27:13.000000000 +0300
+++ tinycc/tcc.h	2015-03-11 07:54:02.000000000 +0300
@@ -232,10 +232,18 @@
 # ifdef TCC_TARGET_PE
 #  define CONFIG_TCC_SYSINCLUDEPATHS "{B}/include;{B}/include/winapi"
 # else
-#  define CONFIG_TCC_SYSINCLUDEPATHS \
-        ALSO_MUADIR(CONFIG_SYSROOT "/usr/local/include") \
-    ":" ALSO_MUADIR(CONFIG_SYSROOT "/usr/include") \
-    ":" "{B}/include"
+    #ifndef CONFIG_TCC_SYSINCLUDEPATHS_ADDON
+       #define CONFIG_TCC_SYSINCLUDEPATHS \
+              ALSO_MUADIR(CONFIG_SYSROOT "/usr/local/include") \
+          ":" ALSO_MUADIR(CONFIG_SYSROOT "/usr/include") \
+          ":" "{B}/include"
+    #else
+       #define CONFIG_TCC_SYSINCLUDEPATHS \
+              ALSO_MUADIR(CONFIG_SYSROOT "/usr/" CONFIG_TCC_SYSINCLUDEPATHS_ADDON) \
+          ":" ALSO_MUADIR(CONFIG_SYSROOT "/usr/local/include") \
+          ":" ALSO_MUADIR(CONFIG_SYSROOT "/usr/include") \
+          ":" "{B}/include"
+    #endif
 # endif
 #endif
 
