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    139   +  --cpu=...                Specify CPU
   140    140   +  --os=...                 Specify OS
   141    141      --enable-mingw32         build windows version on linux with mingw32
   142    142      --enable-cygwin          build windows version on windows with cygwin
   143    143      --enable-cross           build cross compilers
   144    144   diff -uNr tcc-0.9.26.orig/lib/Makefile tcc-0.9.26-1crosscompilefixes/lib/Makefile
   145    145   --- tcc-0.9.26.orig/lib/Makefile	2013-02-15 08:24:00.000000000 -0600
   146         -+++ tcc-0.9.26-1crosscompilefixes/lib/Makefile	2014-05-02 01:55:55.407140003 -0500
   147         -@@ -47,24 +47,22 @@
          146  ++++ tcc-0.9.26-1crosscompilefixes/lib/Makefile	2014-05-16 23:59:18.019016999 -0500
          147  +@@ -25,6 +25,12 @@
          148  +    XCC = $(CC)
          149  +   endif
          150  +  endif
          151  ++ ifeq ($(ARCH),arm)
          152  ++  TARGET = arm
          153  ++  ifneq ($(TARGETOS),Darwin)
          154  ++   XCC = $(CC)
          155  ++  endif
          156  ++ endif
          157  +  endif
          158  +  endif
          159  +  endif
          160  +@@ -41,36 +47,41 @@
          161  + 
          162  + I386_O = libtcc1.o alloca86.o alloca86-bt.o $(BCHECK_O)
          163  + X86_64_O = libtcc1.o alloca86_64.o
          164  ++ARM_O = dummy.o
          165  + WIN32_O = $(I386_O) crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
          166  + WIN64_O = $(X86_64_O) crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
          167  + 
   148    168    ifeq "$(TARGET)" "i386-win32"
   149    169     OBJ = $(addprefix $(DIR)/,$(WIN32_O))
   150    170     TGT = -DTCC_TARGET_I386 -DTCC_TARGET_PE
   151    171   - XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
   152    172   - XAR = $(DIR)/tiny_libmaker$(EXESUF)
   153    173   + XCC = $(CC) -I$(top_srcdir)/win32 -I$(top_srcdir)/include
   154    174    else
................................................................................
   166    186   + XCC ?= $(CC) -I$(TOP)
   167    187    else
   168    188    ifeq "$(TARGET)" "x86_64"
   169    189     OBJ = $(addprefix $(DIR)/,$(X86_64_O))
   170    190     TGT = -DTCC_TARGET_X86_64
   171    191   - XCC ?= $(TCC) -B$(TOP)
   172    192   + XCC ?= $(CC) -I$(TOP)
          193  ++else
          194  ++ifeq "$(TARGET)" "arm"
          195  ++ OBJ = $(addprefix $(DIR)/,$(ARM_O))
          196  ++ TGT = -DTCC_TARGET_ARM
          197  ++ XCC ?= $(CC) -I$(TOP)
   173    198    else
   174    199     $(error libtcc1.a not supported on target '$(TARGET)')
   175    200    endif
          201  + endif
          202  + endif
          203  + endif
          204  ++endif
          205  + 
          206  + XFLAGS = $(CPPFLAGS) $(CFLAGS) $(TGT)
          207  + 
          208  +@@ -99,4 +110,4 @@
          209  + 	@echo $@ > $@
          210  + 
          211  + clean :
          212  +-	rm -rfv i386-win32 x86_64-win32 i386 x86_64
          213  ++	rm -rfv i386-win32 x86_64-win32 i386 x86_64 arm
          214  +diff -uNr tcc-0.9.26.orig/lib/dummy.c tcc-0.9.26-1crosscompilefixes/lib/dummy.c
          215  +--- tcc-0.9.26.orig/lib/dummy.c	1969-12-31 18:00:00.000000000 -0600
          216  ++++ tcc-0.9.26-1crosscompilefixes/lib/dummy.c	2014-05-16 23:56:33.539016999 -0500
          217  +@@ -0,0 +1,2 @@
          218  ++void __libtcc_dummy(void) {
          219  ++}
   176    220   diff -uNr tcc-0.9.26.orig/win32/lib/crt1.c tcc-0.9.26-1crosscompilefixes/win32/lib/crt1.c
   177    221   --- tcc-0.9.26.orig/win32/lib/crt1.c	2013-02-15 08:24:00.000000000 -0600
   178    222   +++ tcc-0.9.26-1crosscompilefixes/win32/lib/crt1.c	2014-05-02 01:56:11.277140003 -0500
   179    223   @@ -19,7 +19,6 @@
   180    224    
   181    225    int _start(void)
   182    226    {