patches/duma/2_5_1/100-cross-compile.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 17 22:46:47 2011 +0200 (2011-07-17)
changeset 2892 aa934ec4b4ee
parent 236 42650dc4e95e
permissions -rw-r--r--
cc/gcc: add the backend/frontend infra for final gcc

Currently, we issue the bare-metal compiler from the pass_1 & pass_2
core compilers, because the final gcc breaks while doing so.

This implies we have to build some libces during the start_files step,
instead of the standard libc step. This is the case for newlib.

By adding a backend/frontend infra to the final gcc, we can abstract
what backend to call: the standard backend for non-bare-metal gcc,
and the core backend for bare-metal.

This patch is just an no-op, it just adds the final backend and
frontend without changing the way bare-metal is built, to come in a
subsequent patch.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@236
     1
diff -dur duma_2_5_1/Makefile duma_2_5_1.orig/Makefile
yann@236
     2
--- duma_2_5_1/Makefile	2006-06-18 06:02:13.000000000 +0200
yann@236
     3
+++ duma_2_5_1.orig/Makefile	2007-07-11 17:49:43.000000000 +0200
yann@236
     4
@@ -98,10 +98,6 @@
yann@236
     5
   LIBS=-lpthread
yann@236
     6
 endif
yann@236
     7
 
yann@236
     8
-
yann@236
     9
-CC=gcc
yann@236
    10
-CXX=g++
yann@236
    11
-AR=ar
yann@236
    12
 INSTALL=install
yann@236
    13
 
yann@236
    14
 ############################################################
yann@369
    15
@@ -169,7 +165,7 @@
yann@236
    16
 
yann@236
    17
 createconf: createconf.o
yann@236
    18
 	- rm -f createconf
yann@236
    19
-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf
yann@369
    20
+	$(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf
yann@236
    21
 
yann@236
    22
 tstheap: libduma.a tstheap.o
yann@236
    23
 	- rm -f tstheap
yann@236
    24
@@ -211,7 +207,7 @@
yann@236
    25
 # define rules how to build objects for createconf
yann@236
    26
 #
yann@236
    27
 createconf.o:
yann@236
    28
-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
yann@369
    29
+	$(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
yann@236
    30
 
yann@236
    31
 
yann@236
    32
 #