Check-in [f0540f631f]
Overview
Comment:Updated to compile on ARM -- requires libgcc symbols, however
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f0540f631f1d3febb1ca52990cb06248db83ede9
User & Date: rkeene on 2014-05-17 05:00:34
Other Links: manifest | tags
Context
2014-05-17
05:01
tcc4tcl 0.6 check-in: bc377b2f75 user: rkeene tags: trunk, 0.6
05:00
Updated to compile on ARM -- requires libgcc symbols, however check-in: f0540f631f user: rkeene tags: trunk
04:39
Fixed rewriting relative paths to headers and added various patches check-in: 8ed457fd51 user: rkeene tags: trunk
Changes

Modified build/tcc-patches/0.9.26/tcc-0.9.26-crosscompilefixes.diff from [6575644e6a] to [f12a7b0ba6].

139
140
141
142
143
144
145
146
147




















148
149
150
151
152
153
154
...
166
167
168
169
170
171
172
173





174
175



















176
177
178
179
180
181
182
+  --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-02 01:55:55.407140003 -0500
@@ -47,24 +47,22 @@




















 ifeq "$(TARGET)" "i386-win32"
  OBJ = $(addprefix $(DIR)/,$(WIN32_O))
  TGT = -DTCC_TARGET_I386 -DTCC_TARGET_PE
- XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
- XAR = $(DIR)/tiny_libmaker$(EXESUF)
+ XCC = $(CC) -I$(top_srcdir)/win32 -I$(top_srcdir)/include
 else
................................................................................
+ XCC ?= $(CC) -I$(TOP)
 else
 ifeq "$(TARGET)" "x86_64"
  OBJ = $(addprefix $(DIR)/,$(X86_64_O))
  TGT = -DTCC_TARGET_X86_64
- XCC ?= $(TCC) -B$(TOP)
+ XCC ?= $(CC) -I$(TOP)
 else





  $(error libtcc1.a not supported on target '$(TARGET)')
 endif



















diff -uNr tcc-0.9.26.orig/win32/lib/crt1.c tcc-0.9.26-1crosscompilefixes/win32/lib/crt1.c
--- tcc-0.9.26.orig/win32/lib/crt1.c	2013-02-15 08:24:00.000000000 -0600
+++ tcc-0.9.26-1crosscompilefixes/win32/lib/crt1.c	2014-05-02 01:56:11.277140003 -0500
@@ -19,7 +19,6 @@
 
 int _start(void)
 {







|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
>
>
>
>
>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
170
171
172
173
174
...
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
+  --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
+ ifeq ($(ARCH),arm)
+  TARGET = arm
+  ifneq ($(TARGETOS),Darwin)
+   XCC = $(CC)
+  endif
+ endif
  endif
  endif
  endif
@@ -41,36 +47,41 @@
 
 I386_O = libtcc1.o alloca86.o alloca86-bt.o $(BCHECK_O)
 X86_64_O = libtcc1.o alloca86_64.o
+ARM_O = dummy.o
 WIN32_O = $(I386_O) crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
 WIN64_O = $(X86_64_O) crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
 
 ifeq "$(TARGET)" "i386-win32"
  OBJ = $(addprefix $(DIR)/,$(WIN32_O))
  TGT = -DTCC_TARGET_I386 -DTCC_TARGET_PE
- XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
- XAR = $(DIR)/tiny_libmaker$(EXESUF)
+ XCC = $(CC) -I$(top_srcdir)/win32 -I$(top_srcdir)/include
 else
................................................................................
+ XCC ?= $(CC) -I$(TOP)
 else
 ifeq "$(TARGET)" "x86_64"
  OBJ = $(addprefix $(DIR)/,$(X86_64_O))
  TGT = -DTCC_TARGET_X86_64
- XCC ?= $(TCC) -B$(TOP)
+ XCC ?= $(CC) -I$(TOP)
+else
+ifeq "$(TARGET)" "arm"
+ OBJ = $(addprefix $(DIR)/,$(ARM_O))
+ TGT = -DTCC_TARGET_ARM
+ XCC ?= $(CC) -I$(TOP)
 else
  $(error libtcc1.a not supported on target '$(TARGET)')
 endif
 endif
 endif
 endif
+endif
 
 XFLAGS = $(CPPFLAGS) $(CFLAGS) $(TGT)
 
@@ -99,4 +110,4 @@
 	@echo $@ > $@
 
 clean :
-	rm -rfv i386-win32 x86_64-win32 i386 x86_64
+	rm -rfv i386-win32 x86_64-win32 i386 x86_64 arm
diff -uNr tcc-0.9.26.orig/lib/dummy.c tcc-0.9.26-1crosscompilefixes/lib/dummy.c
--- tcc-0.9.26.orig/lib/dummy.c	1969-12-31 18:00:00.000000000 -0600
+++ tcc-0.9.26-1crosscompilefixes/lib/dummy.c	2014-05-16 23:56:33.539016999 -0500
@@ -0,0 +1,2 @@
+void __libtcc_dummy(void) {
+}
diff -uNr tcc-0.9.26.orig/win32/lib/crt1.c tcc-0.9.26-1crosscompilefixes/win32/lib/crt1.c
--- tcc-0.9.26.orig/win32/lib/crt1.c	2013-02-15 08:24:00.000000000 -0600
+++ tcc-0.9.26-1crosscompilefixes/win32/lib/crt1.c	2014-05-02 01:56:11.277140003 -0500
@@ -19,7 +19,6 @@
 
 int _start(void)
 {