Diff

Differences From Artifact [f12a7b0ba6]:

To Artifact [b603edb09a]:


1
2
3
4
5
6
7
8
9
10
diff -uNr tcc-0.9.26.orig/configure tcc-0.9.26-1crosscompilefixes/configure
--- tcc-0.9.26.orig/configure	2013-02-15 08:24:00.000000000 -0600
+++ tcc-0.9.26-1crosscompilefixes/configure	2014-05-02 01:27:11.267140003 -0500
@@ -46,16 +46,8 @@
 tcc_lddir=
 confvars=
 
-cpu=`uname -m`
-
-# OS specific


|







1
2
3
4
5
6
7
8
9
10
diff -uNr tcc-0.9.26.orig/configure tcc-0.9.26-1crosscompilefixes/configure
--- tcc-0.9.26.orig/configure	2013-02-15 08:24:00.000000000 -0600
+++ tcc-0.9.26-1crosscompilefixes/configure	2014-05-18 15:45:41.137516999 -0500
@@ -46,16 +46,8 @@
 tcc_lddir=
 confvars=
 
-cpu=`uname -m`
-
-# OS specific
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93






94
95
96





97
98
99
100
101
102
103
   --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
   ;;
+  --os=*) targetos=`echo $opt | cut -d '=' -f 2-`
+  ;;
   --enable-gprof) gprof="yes"
   ;;
   --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86
@@ -181,6 +134,55 @@
   esac
 done
 
+# OS specific
+case $targetos in
+  MINGW32*|mingw32*)  mingw32=yes;;
+  DragonFly) noldl=yes;;
+  OpenBSD)   noldl=yes;;
+  *) ;;
+esac
+
+case "$cpu" in
+  i386|i486|i586|i686|i86pc|BePC|i686-AT386)
+    cpu="x86"






+  ;;
+  x86_64)
+    cpu="x86-64"





+  ;;
+  arm*)
+    case "$cpu" in
+      arm|armv4l)
+        cpuver=4
+      ;;
+      armv5tel|armv5tejl)







|














>
>
>
>
>
>



>
>
>
>
>







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
   --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
   ;;
+  --os=*) targetos=`echo $opt | cut -d '=' -f 2-`
+  ;;
   --enable-gprof) gprof="yes"
   ;;
   --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86
@@ -181,6 +134,66 @@
   esac
 done
 
+# OS specific
+case $targetos in
+  MINGW32*|mingw32*)  mingw32=yes;;
+  DragonFly) noldl=yes;;
+  OpenBSD)   noldl=yes;;
+  *) ;;
+esac
+
+case "$cpu" in
+  i386|i486|i586|i686|i86pc|BePC|i686-AT386)
+    cpu="x86"
+    case " ${cc} ${CFLAGS} " in
+      *' -m64 '*)
+        cpu="x86-64"
+        ;;
+    esac
+
+  ;;
+  x86_64)
+    cpu="x86-64"
+    case " ${cc} ${CFLAGS} " in
+      *' -m32 '*)
+        cpu="x86"
+        ;;
+    esac
+  ;;
+  arm*)
+    case "$cpu" in
+      arm|armv4l)
+        cpuver=4
+      ;;
+      armv5tel|armv5tejl)
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143








144
145
146
147
148
149
150
+    cpu="unknown"
+  ;;
+esac
+
 # Checking for CFLAGS
 if test -z "$CFLAGS"; then
     CFLAGS="-Wall -g -O2"
@@ -270,6 +272,8 @@
   --disable-static         make libtcc.so instead of libtcc.a
   --disable-rpath          disable use of -rpath with the above
   --with-libgcc            use /lib/libgcc_s.so.1 instead of libtcc.a
+  --cpu=...                Specify CPU
+  --os=...                 Specify OS
   --enable-mingw32         build windows version on linux with mingw32
   --enable-cygwin          build windows version on windows with cygwin
   --enable-cross           build cross compilers








diff -uNr tcc-0.9.26.orig/lib/Makefile tcc-0.9.26-1crosscompilefixes/lib/Makefile
--- tcc-0.9.26.orig/lib/Makefile	2013-02-15 08:24:00.000000000 -0600
+++ tcc-0.9.26-1crosscompilefixes/lib/Makefile	2014-05-16 23:59:18.019016999 -0500
@@ -25,6 +25,12 @@
    XCC = $(CC)
   endif
  endif







|








>
>
>
>
>
>
>
>







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
+    cpu="unknown"
+  ;;
+esac
+
 # Checking for CFLAGS
 if test -z "$CFLAGS"; then
     CFLAGS="-Wall -g -O2"
@@ -270,6 +283,8 @@
   --disable-static         make libtcc.so instead of libtcc.a
   --disable-rpath          disable use of -rpath with the above
   --with-libgcc            use /lib/libgcc_s.so.1 instead of libtcc.a
+  --cpu=...                Specify CPU
+  --os=...                 Specify OS
   --enable-mingw32         build windows version on linux with mingw32
   --enable-cygwin          build windows version on windows with cygwin
   --enable-cross           build cross compilers
@@ -283,7 +298,6 @@
 exit 1
 fi
 
-cc="${cross_prefix}${cc}"
 ar="${cross_prefix}${ar}"
 strip="${cross_prefix}${strip}"
 
diff -uNr tcc-0.9.26.orig/lib/Makefile tcc-0.9.26-1crosscompilefixes/lib/Makefile
--- tcc-0.9.26.orig/lib/Makefile	2013-02-15 08:24:00.000000000 -0600
+++ tcc-0.9.26-1crosscompilefixes/lib/Makefile	2014-05-16 23:59:18.019016999 -0500
@@ -25,6 +25,12 @@
    XCC = $(CC)
   endif
  endif