patches/gcc/4.3.5/130-cross-compile.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 18 23:00:46 2011 +0200 (2011-05-18)
changeset 2467 200836977ce6
parent 1461 35b30f8fb307
permissions -rw-r--r--
config: rename variables that are arrays

Make it explicit that a variable is an array bu the name of the variable.
It will be used later when .config gets munged to allow both multiple
arguments and arguments with spaces at the same time to be passed from the
configuration down to the build scripts.

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,