patches/gcc/4.3.4/130-cross-compile.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:28:10 2011 +0200 (2011-08-02)
changeset 2590 b64cfb67944e
permissions -rw-r--r--
scripts/functions: svn retrieval first tries the mirror for tarballs

The svn download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via svn.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard svn retrieval will kick in.

Reported-by: ANDY KENNEDY <ANDY.KENNEDY@adtran.com>
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,