patches/gcc/4.3.6/130-cross-compile.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 17 17:54:21 2011 +0200 (2011-07-17)
changeset 2888 dd71df95903a
parent 2124 5dd0b83ae528
permissions -rw-r--r--
cc/gcc: pass the companion libs prefix to cc_core

In case of canadian-cross, the companion libraries are not the same for
the core cc (they run on 'build') as they are for the final cc (they run
on 'host').

Prepare for this differentiation (coming later), while retaining the
current behavior (to use the same compblibs).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
thomas@1461
     1
Original patch from: ../4.3.2/130-cross-compile.patch
thomas@1461
     2
thomas@1461
     3
-= BEGIN original header =-
thomas@1461
     4
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/08_all_gcc-4.1-cross-compile.patch
thomas@1461
     5
Some notes on the 'bootstrap with or without libc headers' debate:
thomas@1461
     6
http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html
thomas@1461
     7
http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html
thomas@1461
     8
thomas@1461
     9
-= END original header =-
thomas@1461
    10
thomas@1461
    11
diff -durN gcc-4.3.3.orig/gcc/configure gcc-4.3.3/gcc/configure
thomas@1461
    12
--- gcc-4.3.3.orig/gcc/configure	2008-08-01 11:51:03.000000000 +0200
thomas@1461
    13
+++ gcc-4.3.3/gcc/configure	2009-01-27 22:19:16.000000000 +0100
thomas@1461
    14
@@ -13442,7 +13442,7 @@
thomas@1461
    15
 	    | powerpc*-*-*,powerpc64*-*-*)
thomas@1461
    16
 		CROSS="$CROSS -DNATIVE_CROSS" ;;
thomas@1461
    17
 	esac
thomas@1461
    18
-elif test "x$TARGET_SYSTEM_ROOT" != x; then
thomas@1461
    19
+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
thomas@1461
    20
         SYSTEM_HEADER_DIR=$build_system_header_dir
thomas@1461
    21
 fi
thomas@1461
    22
 
thomas@1461
    23
diff -durN gcc-4.3.3.orig/gcc/configure.ac gcc-4.3.3/gcc/configure.ac
thomas@1461
    24
--- gcc-4.3.3.orig/gcc/configure.ac	2008-08-01 11:51:03.000000000 +0200
thomas@1461
    25
+++ gcc-4.3.3/gcc/configure.ac	2009-01-27 22:19:16.000000000 +0100
thomas@1461
    26
@@ -1749,7 +1749,7 @@
thomas@1461
    27
 	    | powerpc*-*-*,powerpc64*-*-*)
thomas@1461
    28
 		CROSS="$CROSS -DNATIVE_CROSS" ;;
thomas@1461
    29
 	esac
thomas@1461
    30
-elif test "x$TARGET_SYSTEM_ROOT" != x; then
thomas@1461
    31
+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
thomas@1461
    32
         SYSTEM_HEADER_DIR=$build_system_header_dir 
thomas@1461
    33
 fi
thomas@1461
    34
 
thomas@1461
    35
diff -durN gcc-4.3.3.orig/gcc/unwind-dw2.c gcc-4.3.3/gcc/unwind-dw2.c
thomas@1461
    36
--- gcc-4.3.3.orig/gcc/unwind-dw2.c	2008-09-25 00:44:28.000000000 +0200
thomas@1461
    37
+++ gcc-4.3.3/gcc/unwind-dw2.c	2009-01-27 22:19:16.000000000 +0100
thomas@1461
    38
@@ -334,9 +334,11 @@
thomas@1461
    39
 }
thomas@1461
    40
 #endif
thomas@1461
    41
 
thomas@1461
    42
+#ifndef inhibit_libc
thomas@1461
    43
 #ifdef MD_UNWIND_SUPPORT
thomas@1461
    44
 #include MD_UNWIND_SUPPORT
thomas@1461
    45
 #endif
thomas@1461
    46
+#endif
thomas@1461
    47
 
thomas@1461
    48
 /* Extract any interesting information from the CIE for the translation
thomas@1461
    49
    unit F belongs to.  Return a pointer to the byte after the augmentation,