patches/gcc/4.3.1/175-cross-compile.patch
changeset 746 b150d6f590fc
parent 552 4edbcdb17e3d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/gcc/4.3.1/175-cross-compile.patch	Mon Jul 28 21:08:01 2008 +0000
     1.3 @@ -0,0 +1,44 @@
     1.4 +Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/08_all_gcc-4.1-cross-compile.patch
     1.5 +Some notes on the 'bootstrap with or without libc headers' debate:
     1.6 +http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html
     1.7 +http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html
     1.8 +
     1.9 +diff -durN gcc-4.3.1.orig/gcc/configure gcc-4.3.1/gcc/configure
    1.10 +--- gcc-4.3.1.orig/gcc/configure	2008-05-21 10:54:15.000000000 +0200
    1.11 ++++ gcc-4.3.1/gcc/configure	2008-06-10 14:57:42.000000000 +0200
    1.12 +@@ -13283,7 +13283,7 @@
    1.13 + 	    | powerpc*-*-*,powerpc64*-*-*)
    1.14 + 		CROSS="$CROSS -DNATIVE_CROSS" ;;
    1.15 + 	esac
    1.16 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
    1.17 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
    1.18 +         SYSTEM_HEADER_DIR=$build_system_header_dir
    1.19 + fi
    1.20 + 
    1.21 +diff -durN gcc-4.3.1.orig/gcc/configure.ac gcc-4.3.1/gcc/configure.ac
    1.22 +--- gcc-4.3.1.orig/gcc/configure.ac	2008-05-21 10:54:15.000000000 +0200
    1.23 ++++ gcc-4.3.1/gcc/configure.ac	2008-06-10 14:57:42.000000000 +0200
    1.24 +@@ -1749,7 +1749,7 @@
    1.25 + 	    | powerpc*-*-*,powerpc64*-*-*)
    1.26 + 		CROSS="$CROSS -DNATIVE_CROSS" ;;
    1.27 + 	esac
    1.28 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
    1.29 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
    1.30 +         SYSTEM_HEADER_DIR=$build_system_header_dir 
    1.31 + fi
    1.32 + 
    1.33 +diff -durN gcc-4.3.1.orig/gcc/unwind-dw2.c gcc-4.3.1/gcc/unwind-dw2.c
    1.34 +--- gcc-4.3.1.orig/gcc/unwind-dw2.c	2007-07-25 20:14:57.000000000 +0200
    1.35 ++++ gcc-4.3.1/gcc/unwind-dw2.c	2008-06-10 14:57:42.000000000 +0200
    1.36 +@@ -334,9 +334,11 @@
    1.37 + }
    1.38 + #endif
    1.39 + 
    1.40 ++#ifndef inhibit_libc
    1.41 + #ifdef MD_UNWIND_SUPPORT
    1.42 + #include MD_UNWIND_SUPPORT
    1.43 + #endif
    1.44 ++#endif
    1.45 + 
    1.46 + /* Extract any interesting information from the CIE for the translation
    1.47 +    unit F belongs to.  Return a pointer to the byte after the augmentation,