patches/gcc/4.3.5/130-cross-compile.patch
changeset 2124 5dd0b83ae528
parent 1461 35b30f8fb307
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/gcc/4.3.5/130-cross-compile.patch	Sun Sep 19 18:37:18 2010 +0200
     1.3 @@ -0,0 +1,49 @@
     1.4 +Original patch from: ../4.3.2/130-cross-compile.patch
     1.5 +
     1.6 +-= BEGIN original header =-
     1.7 +Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/08_all_gcc-4.1-cross-compile.patch
     1.8 +Some notes on the 'bootstrap with or without libc headers' debate:
     1.9 +http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html
    1.10 +http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html
    1.11 +
    1.12 +-= END original header =-
    1.13 +
    1.14 +diff -durN gcc-4.3.3.orig/gcc/configure gcc-4.3.3/gcc/configure
    1.15 +--- gcc-4.3.3.orig/gcc/configure	2008-08-01 11:51:03.000000000 +0200
    1.16 ++++ gcc-4.3.3/gcc/configure	2009-01-27 22:19:16.000000000 +0100
    1.17 +@@ -13442,7 +13442,7 @@
    1.18 + 	    | powerpc*-*-*,powerpc64*-*-*)
    1.19 + 		CROSS="$CROSS -DNATIVE_CROSS" ;;
    1.20 + 	esac
    1.21 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
    1.22 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
    1.23 +         SYSTEM_HEADER_DIR=$build_system_header_dir
    1.24 + fi
    1.25 + 
    1.26 +diff -durN gcc-4.3.3.orig/gcc/configure.ac gcc-4.3.3/gcc/configure.ac
    1.27 +--- gcc-4.3.3.orig/gcc/configure.ac	2008-08-01 11:51:03.000000000 +0200
    1.28 ++++ gcc-4.3.3/gcc/configure.ac	2009-01-27 22:19:16.000000000 +0100
    1.29 +@@ -1749,7 +1749,7 @@
    1.30 + 	    | powerpc*-*-*,powerpc64*-*-*)
    1.31 + 		CROSS="$CROSS -DNATIVE_CROSS" ;;
    1.32 + 	esac
    1.33 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
    1.34 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
    1.35 +         SYSTEM_HEADER_DIR=$build_system_header_dir 
    1.36 + fi
    1.37 + 
    1.38 +diff -durN gcc-4.3.3.orig/gcc/unwind-dw2.c gcc-4.3.3/gcc/unwind-dw2.c
    1.39 +--- gcc-4.3.3.orig/gcc/unwind-dw2.c	2008-09-25 00:44:28.000000000 +0200
    1.40 ++++ gcc-4.3.3/gcc/unwind-dw2.c	2009-01-27 22:19:16.000000000 +0100
    1.41 +@@ -334,9 +334,11 @@
    1.42 + }
    1.43 + #endif
    1.44 + 
    1.45 ++#ifndef inhibit_libc
    1.46 + #ifdef MD_UNWIND_SUPPORT
    1.47 + #include MD_UNWIND_SUPPORT
    1.48 + #endif
    1.49 ++#endif
    1.50 + 
    1.51 + /* Extract any interesting information from the CIE for the translation
    1.52 +    unit F belongs to.  Return a pointer to the byte after the augmentation,