patches/gcc/4.4.0/130-cross-compile.patch
changeset 1761 88020b2c3246
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/gcc/4.4.0/130-cross-compile.patch	Tue Jan 12 19:24:03 2010 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure
     1.5 +--- gcc-4.4.0.orig/gcc/configure	2009-03-24 18:46:03.000000000 +0100
     1.6 ++++ gcc-4.4.0/gcc/configure	2009-05-27 21:38:06.000000000 +0200
     1.7 +@@ -13997,7 +13997,7 @@
     1.8 + 	    | powerpc*-*-*,powerpc64*-*-*)
     1.9 + 		CROSS="$CROSS -DNATIVE_CROSS" ;;
    1.10 + 	esac
    1.11 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
    1.12 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
    1.13 +         SYSTEM_HEADER_DIR=$build_system_header_dir
    1.14 + fi
    1.15 + 
    1.16 +diff -durN gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac
    1.17 +--- gcc-4.4.0.orig/gcc/configure.ac	2009-03-24 18:46:03.000000000 +0100
    1.18 ++++ gcc-4.4.0/gcc/configure.ac	2009-05-27 21:38:06.000000000 +0200
    1.19 +@@ -1720,7 +1720,7 @@
    1.20 + 	    | powerpc*-*-*,powerpc64*-*-*)
    1.21 + 		CROSS="$CROSS -DNATIVE_CROSS" ;;
    1.22 + 	esac
    1.23 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
    1.24 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
    1.25 +         SYSTEM_HEADER_DIR=$build_system_header_dir 
    1.26 + fi
    1.27 + 
    1.28 +diff -durN gcc-4.4.0.orig/gcc/unwind-dw2.c gcc-4.4.0/gcc/unwind-dw2.c
    1.29 +--- gcc-4.4.0.orig/gcc/unwind-dw2.c	2009-04-10 01:23:07.000000000 +0200
    1.30 ++++ gcc-4.4.0/gcc/unwind-dw2.c	2009-05-27 21:38:06.000000000 +0200
    1.31 +@@ -329,9 +329,11 @@
    1.32 + }
    1.33 + #endif
    1.34 + 
    1.35 ++#ifndef inhibit_libc
    1.36 + #ifdef MD_UNWIND_SUPPORT
    1.37 + #include MD_UNWIND_SUPPORT
    1.38 + #endif
    1.39 ++#endif
    1.40 + 
    1.41 + /* Extract any interesting information from the CIE for the translation
    1.42 +    unit F belongs to.  Return a pointer to the byte after the augmentation,