Index: patches/gcc-4.2.1-cross_search_paths-1.patch
===================================================================
--- patches/gcc-4.2.1-cross_search_paths-1.patch	(revision 78885f9d2b075eea96774d9383f1c2a2834a5445)
+++ 	(revision )
@@ -1,51 +1,0 @@
-Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
-Date: 2007-02-14
-Initial Package Version: 4.2.0
-Origin: Ryan Oliver (issue reported by Erik-Jan Post)
-        Rediffed against 4.1.0 by Chris Staub
-        Rediffed against 4.1.2 by Jim Gifford
-	Rediffed against 4.2.0 by Joe Ciccone
-Upstream Status: N/A
-Description:
-  Removes standard_exec_prefix_2 from library search path when cross-compiling.
-  Removes both standard_exec_prefix_1 and standard_exec_prefix_2 from the gcc
-  executable search path when cross-compiling.
-
-  ie: if cross_compile = 1 in the specs file, do not
-      - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} to the library search path
-      - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} or
-                   /usr/libexec/gcc/${TARGET}/${GCC_VER}
-        to the executable search path
-
-  This avoids the possibility of linking in libraries from the host if they
-  exist under those directories.
-
-diff -Naur gcc-4.2.0.orig/gcc/gcc.c gcc-4.2.0/gcc/gcc.c
---- gcc-4.2.0.orig/gcc/gcc.c	2007-05-16 19:21:26.000000000 -0400
-+++ gcc-4.2.0/gcc/gcc.c	2007-05-16 19:22:10.000000000 -0400
-@@ -3949,16 +3949,22 @@
- 	      PREFIX_PRIORITY_LAST, 2, 0);
-   add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
- 	      PREFIX_PRIORITY_LAST, 2, 0);
--  add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
-+  if (*cross_compile == '0')
-+    {
-+      add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
- 	      PREFIX_PRIORITY_LAST, 2, 0);
--  add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
-+      add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
- 	      PREFIX_PRIORITY_LAST, 2, 0);
-+    }
- #endif
- 
-   add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
- 	      PREFIX_PRIORITY_LAST, 1, 0);
--  add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
-+  if (*cross_compile == '0')
-+    {
-+      add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
- 	      PREFIX_PRIORITY_LAST, 1, 0);
-+    }
- 
-   tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
- 			   dir_separator_str, NULL);
Index: patches/gcc-4.2.1-posix-1.patch
===================================================================
--- patches/gcc-4.2.1-posix-1.patch	(revision 78885f9d2b075eea96774d9383f1c2a2834a5445)
+++ 	(revision )
@@ -1,297 +1,0 @@
-Submitted By: Jim Gifford (patches at jg555 dot com)
-Date: 2007-02-14
-Initial Package Version: 4.1.2
-Origin: Jim Gifford
-        Rediffed against 4.1.0 by Chris Staub
-        Rediffed against 4.1.2 by Jim Gifford
-        Rediffed and additions against 4.2.0 by Joe Ciccone
-        Rediffed against 4.2.1 by Joe Ciccone
-Upstream Status: On Hold
-Description: Makes GCC Posix Compliant
-
-diff -Naur gcc-4.2.1.orig/contrib/test_summary gcc-4.2.1/contrib/test_summary
---- gcc-4.2.1.orig/contrib/test_summary	2004-08-26 01:51:22.000000000 -0400
-+++ gcc-4.2.1/contrib/test_summary	2007-07-22 19:31:03.000000000 -0400
-@@ -106,7 +106,7 @@
-     srcdir = configflags;
-     sub(/\/configure .*/, "", srcdir);
-     printf "LAST_UPDATED: ";
--    system("tail -1 " srcdir "/LAST_UPDATED");
-+    system("tail -n 1 " srcdir "/LAST_UPDATED");
-     print "";
- 
-     sub(/^[^ ]*\/configure */, " ", configflags);
-diff -Naur gcc-4.2.1.orig/gcc/configure gcc-4.2.1/gcc/configure
---- gcc-4.2.1.orig/gcc/configure	2007-01-01 22:44:31.000000000 -0500
-+++ gcc-4.2.1/gcc/configure	2007-07-22 19:31:03.000000000 -0400
-@@ -14120,7 +14120,7 @@
-   # Therefore, use diff -b for the comparisons.
-   if test x$gcc_cv_objdump != x \
-   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
--     | tail -3 > conftest.got \
-+     | tail -n 3 > conftest.got \
-   && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
-     || diff -b conftest.big conftest.got > /dev/null 2>&1; }
-   then
-diff -Naur gcc-4.2.1.orig/gcc/configure.ac gcc-4.2.1/gcc/configure.ac
---- gcc-4.2.1.orig/gcc/configure.ac	2007-01-01 22:44:31.000000000 -0500
-+++ gcc-4.2.1/gcc/configure.ac	2007-07-22 19:31:03.000000000 -0400
-@@ -2227,7 +2227,7 @@
-   # Therefore, use diff -b for the comparisons.
-   if test x$gcc_cv_objdump != x \
-   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
--     | tail -3 > conftest.got \
-+     | tail -n 3 > conftest.got \
-   && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
-     || diff -b conftest.big conftest.got > /dev/null 2>&1; }
-   then
-diff -Naur gcc-4.2.1.orig/gcc/testsuite/ada/acats/run_all.sh gcc-4.2.1/gcc/testsuite/ada/acats/run_all.sh
---- gcc-4.2.1.orig/gcc/testsuite/ada/acats/run_all.sh	2006-09-14 06:12:03.000000000 -0400
-+++ gcc-4.2.1/gcc/testsuite/ada/acats/run_all.sh	2007-07-22 19:31:03.000000000 -0400
-@@ -68,7 +68,7 @@
-   ls ${i}?.adb > ${i}.lst 2> /dev/null
-   ls ${i}*m.adb >> ${i}.lst 2> /dev/null
-   ls ${i}.adb >> ${i}.lst 2> /dev/null
--  main=`tail -1 ${i}.lst`
-+  main=`tail -n 1 ${i}.lst`
- }
- 
- EXTERNAL_OBJECTS=""
-diff -Naur gcc-4.2.1.orig/libgomp/acinclude.m4 gcc-4.2.1/libgomp/acinclude.m4
---- gcc-4.2.1.orig/libgomp/acinclude.m4	2007-03-18 09:45:56.000000000 -0400
-+++ gcc-4.2.1/libgomp/acinclude.m4	2007-07-22 19:31:03.000000000 -0400
-@@ -147,7 +147,7 @@
-   # Start by getting the version number.  I think the libtool test already
-   # does some of this, but throws away the result.
-   changequote(,)
--  ldver=`$LD --version 2>/dev/null | head -1 | \
-+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
-          sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
-   changequote([,])
-   libgomp_gnu_ld_version=`echo $ldver | \
-diff -Naur gcc-4.2.1.orig/libgomp/configure gcc-4.2.1/libgomp/configure
---- gcc-4.2.1.orig/libgomp/configure	2007-07-19 10:33:56.000000000 -0400
-+++ gcc-4.2.1/libgomp/configure	2007-07-22 19:31:03.000000000 -0400
-@@ -9314,7 +9314,7 @@
-   # Start by getting the version number.  I think the libtool test already
-   # does some of this, but throws away the result.
- 
--  ldver=`$LD --version 2>/dev/null | head -1 | \
-+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
-          sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-   libgomp_gnu_ld_version=`echo $ldver | \
-diff -Naur gcc-4.2.1.orig/libjava/classpath/configure gcc-4.2.1/libjava/classpath/configure
---- gcc-4.2.1.orig/libjava/classpath/configure	2007-01-17 13:10:26.000000000 -0500
-+++ gcc-4.2.1/libjava/classpath/configure	2007-07-22 19:31:03.000000000 -0400
-@@ -18514,7 +18514,7 @@
- fi # shortcircut to system "stdint.h"
- # ------------------ PREPARE VARIABLES ------------------------------
- if test "$GCC" = "yes" ; then
--ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
-+ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1`
- else
- ac_cv_stdint_message="using $CC"
- fi
-diff -Naur gcc-4.2.1.orig/libjava/classpath/ltcf-c.sh gcc-4.2.1/libjava/classpath/ltcf-c.sh
---- gcc-4.2.1.orig/libjava/classpath/ltcf-c.sh	2006-01-17 13:09:40.000000000 -0500
-+++ gcc-4.2.1/libjava/classpath/ltcf-c.sh	2007-07-22 19:31:03.000000000 -0400
-@@ -153,7 +153,7 @@
-     # If the export-symbols file already is a .def file (1st line
-     # is EXPORTS), use it as is.
-     # If DATA tags from a recent dlltool are present, honour them!
--    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-+    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname-def;
-       else
-         echo EXPORTS > $output_objdir/$soname-def;
-diff -Naur gcc-4.2.1.orig/libjava/classpath/ltcf-gcj.sh gcc-4.2.1/libjava/classpath/ltcf-gcj.sh
---- gcc-4.2.1.orig/libjava/classpath/ltcf-gcj.sh	2005-09-23 17:31:04.000000000 -0400
-+++ gcc-4.2.1/libjava/classpath/ltcf-gcj.sh	2007-07-22 19:31:03.000000000 -0400
-@@ -156,7 +156,7 @@
-     # If the export-symbols file already is a .def file (1st line
-     # is EXPORTS), use it as is.
-     # If DATA tags from a recent dlltool are present, honour them!
--    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-+    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname-def;
-       else
-         echo EXPORTS > $output_objdir/$soname-def;
-diff -Naur gcc-4.2.1.orig/libjava/classpath/m4/ax_create_stdint_h.m4 gcc-4.2.1/libjava/classpath/m4/ax_create_stdint_h.m4
---- gcc-4.2.1.orig/libjava/classpath/m4/ax_create_stdint_h.m4	2006-01-17 13:09:40.000000000 -0500
-+++ gcc-4.2.1/libjava/classpath/m4/ax_create_stdint_h.m4	2007-07-22 19:31:03.000000000 -0400
-@@ -217,7 +217,7 @@
- fi # shortcircut to system "stdint.h"
- # ------------------ PREPARE VARIABLES ------------------------------
- if test "$GCC" = "yes" ; then
--ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
-+ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1`
- else
- ac_cv_stdint_message="using $CC"
- fi
-diff -Naur gcc-4.2.1.orig/libjava/configure gcc-4.2.1/libjava/configure
---- gcc-4.2.1.orig/libjava/configure	2007-07-19 10:33:56.000000000 -0400
-+++ gcc-4.2.1/libjava/configure	2007-07-22 19:31:03.000000000 -0400
-@@ -7025,8 +7025,8 @@
- echo $ECHO_N "checking whether 'ld' is at least 2.13... $ECHO_C" >&6
- LD_PROG=`$CC --print-prog-name=ld`
- LD_VERSION=`$LD_PROG --version`
--LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
--LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
-+LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
-+LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
- if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
-   LD_OK="ok"
- else
-diff -Naur gcc-4.2.1.orig/libjava/mingwld.m4 gcc-4.2.1/libjava/mingwld.m4
---- gcc-4.2.1.orig/libjava/mingwld.m4	2005-08-22 18:36:35.000000000 -0400
-+++ gcc-4.2.1/libjava/mingwld.m4	2007-07-22 19:31:03.000000000 -0400
-@@ -3,8 +3,8 @@
- AC_MSG_CHECKING(whether 'ld' is at least 2.13)
- LD_PROG=`$CC --print-prog-name=ld`
- LD_VERSION=`$LD_PROG --version`
--LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
--LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
-+LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
-+LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
- if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
-   LD_OK="ok"
- else
-diff -Naur gcc-4.2.1.orig/libstdc++-v3/acinclude.m4 gcc-4.2.1/libstdc++-v3/acinclude.m4
---- gcc-4.2.1.orig/libstdc++-v3/acinclude.m4	2007-06-28 19:02:05.000000000 -0400
-+++ gcc-4.2.1/libstdc++-v3/acinclude.m4	2007-07-22 19:31:03.000000000 -0400
-@@ -234,7 +234,7 @@
-   if test x"$with_gnu_ld" = x"yes"; then
-     AC_MSG_CHECKING([for ld version])
-     changequote(,)
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
-     changequote([,])
-     glibcxx_gnu_ld_version=`echo $ldver | \
-diff -Naur gcc-4.2.1.orig/libstdc++-v3/configure gcc-4.2.1/libstdc++-v3/configure
---- gcc-4.2.1.orig/libstdc++-v3/configure	2007-06-28 19:02:05.000000000 -0400
-+++ gcc-4.2.1/libstdc++-v3/configure	2007-07-22 19:31:03.000000000 -0400
-@@ -8541,7 +8541,7 @@
-     echo "$as_me:$LINENO: checking for ld version" >&5
- echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -54451,7 +54451,7 @@
-     echo "$as_me:$LINENO: checking for ld version" >&5
- echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -75811,7 +75811,7 @@
-     echo "$as_me:$LINENO: checking for ld version" >&5
- echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -77334,7 +77334,7 @@
-     echo "$as_me:$LINENO: checking for ld version" >&5
- echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -78825,7 +78825,7 @@
-     echo "$as_me:$LINENO: checking for ld version" >&5
- echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -100715,7 +100715,7 @@
-     echo "$as_me:$LINENO: checking for ld version" >&5
- echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -101560,7 +101560,7 @@
-     echo "$as_me:$LINENO: checking for ld version" >&5
- echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -102961,7 +102961,7 @@
-     echo "$as_me:$LINENO: checking for ld version" >&5
- echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -104754,7 +104754,7 @@
-     echo "$as_me:$LINENO: checking for ld version" >&5
- echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -105997,7 +105997,7 @@
-     echo "$as_me:$LINENO: checking for ld version" >&5
- echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -107024,7 +107024,7 @@
-     echo "$as_me:$LINENO: checking for ld version" >&5
- echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-diff -Naur gcc-4.2.1.orig/ltcf-c.sh gcc-4.2.1/ltcf-c.sh
---- gcc-4.2.1.orig/ltcf-c.sh	2005-11-18 17:53:08.000000000 -0500
-+++ gcc-4.2.1/ltcf-c.sh	2007-07-22 19:31:03.000000000 -0400
-@@ -153,7 +153,7 @@
-     # If the export-symbols file already is a .def file (1st line
-     # is EXPORTS), use it as is.
-     # If DATA tags from a recent dlltool are present, honour them!
--    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-+    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname-def;
-       else
-         echo EXPORTS > $output_objdir/$soname-def;
-diff -Naur gcc-4.2.1.orig/ltcf-gcj.sh gcc-4.2.1/ltcf-gcj.sh
---- gcc-4.2.1.orig/ltcf-gcj.sh	2005-07-15 22:30:53.000000000 -0400
-+++ gcc-4.2.1/ltcf-gcj.sh	2007-07-22 19:31:03.000000000 -0400
-@@ -156,7 +156,7 @@
-     # If the export-symbols file already is a .def file (1st line
-     # is EXPORTS), use it as is.
-     # If DATA tags from a recent dlltool are present, honour them!
--    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-+    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname-def;
-       else
-         echo EXPORTS > $output_objdir/$soname-def;
Index: patches/gcc-4.2.1-powerpc64_multilib-1.patch
===================================================================
--- patches/gcc-4.2.1-powerpc64_multilib-1.patch	(revision 78885f9d2b075eea96774d9383f1c2a2834a5445)
+++ 	(revision )
@@ -1,57 +1,0 @@
-Submitted By: Ken Moffat (ken at linuxfromscratch dot org)
-Origin: fedora
-        Rediffed against 4.1.0 by Chris Staub
-	Rediffed against 4.2.0 by Joe Ciccone
-Date: 2005-11-22
-Initial package version: 4.0.2
-Description: In a native ppc64 build, this fixes a linkage failure while
-installing a 32-bit nof/ (no -hardware- floating point) library, and also gets
-rid of 1500 failures in the g++ testsuite.  From fedora gcc-4.0.1, rediffed to
-apply with -p1.
-
-diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/t-linux64 gcc-4.2.0/gcc/config/rs6000/t-linux64
---- gcc-4.2.0.orig/gcc/config/rs6000/t-linux64	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/rs6000/t-linux64	2007-05-16 19:51:48.000000000 -0400
-@@ -7,13 +7,13 @@
- 
- TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc
- 
--MULTILIB_OPTIONS        = m64/m32 msoft-float
--MULTILIB_DIRNAMES       = 64 32 nof
-+MULTILIB_OPTIONS        = m64/m32
-+MULTILIB_DIRNAMES       = 64 32
- MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
--MULTILIB_EXCEPTIONS     = m64/msoft-float
--MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
--MULTILIB_OSDIRNAMES	= ../lib64 ../lib nof
--MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
-+MULTILIB_EXCEPTIONS     =
-+MULTILIB_EXCLUSIONS     =
-+MULTILIB_OSDIRNAMES	= ../lib64 ../lib
-+MULTILIB_MATCHES        =
- 
- softfp_wrap_start := '\#ifndef __powerpc64__'
- softfp_wrap_end := '\#endif'
-diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/t-linux64.orig gcc-4.2.0/gcc/config/rs6000/t-linux64.orig
---- gcc-4.2.0.orig/gcc/config/rs6000/t-linux64.orig	1969-12-31 19:00:00.000000000 -0500
-+++ gcc-4.2.0/gcc/config/rs6000/t-linux64.orig	2007-05-16 19:51:40.000000000 -0400
-@@ -0,0 +1,19 @@
-+
-+#rs6000/t-linux64
-+
-+LIB2FUNCS_EXTRA += tramp.S $(srcdir)/config/rs6000/ppc64-fp.c \
-+	$(srcdir)/config/rs6000/darwin-ldouble.c
-+LIB2FUNCS_EXTRA := $(sort $(LIB2FUNCS_EXTRA))
-+
-+TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc
-+
-+MULTILIB_OPTIONS        = m64/m32 msoft-float
-+MULTILIB_DIRNAMES       = 64 32 nof
-+MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
-+MULTILIB_EXCEPTIONS     = m64/msoft-float
-+MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
-+MULTILIB_OSDIRNAMES	= ../lib64 ../lib nof
-+MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
-+
-+softfp_wrap_start := '\#ifndef __powerpc64__'
-+softfp_wrap_end := '\#endif'
Index: patches/gcc-4.2.1-pure64-1.patch
===================================================================
--- patches/gcc-4.2.1-pure64-1.patch	(revision 78885f9d2b075eea96774d9383f1c2a2834a5445)
+++ 	(revision )
@@ -1,162 +1,0 @@
-diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux64.h gcc-4.2.0/gcc/config/i386/linux64.h
---- gcc-4.2.0.orig/gcc/config/i386/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/i386/linux64.h	2007-05-18 17:04:05.000000000 -0400
-@@ -49,8 +49,8 @@
-    When the -shared link option is used a final link is not being
-    done.  */
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
- 
- #undef	LINK_SPEC
- #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
-diff -Naur gcc-4.2.0.orig/gcc/config/i386/t-linux64 gcc-4.2.0/gcc/config/i386/t-linux64
---- gcc-4.2.0.orig/gcc/config/i386/t-linux64	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/i386/t-linux64	2007-05-18 17:04:36.000000000 -0400
-@@ -6,7 +6,7 @@
- 
- MULTILIB_OPTIONS = m64/m32
- MULTILIB_DIRNAMES = 64 32 
--MULTILIB_OSDIRNAMES = ../lib64 ../lib
-+MULTILIB_OSDIRNAMES = ../lib ../lib32
- 
- LIBGCC = stmp-multilib
- INSTALL_LIBGCC = install-multilib
-diff -Naur gcc-4.2.0.orig/gcc/config/mips/linux64.h gcc-4.2.0/gcc/config/mips/linux64.h
---- gcc-4.2.0.orig/gcc/config/mips/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/mips/linux64.h	2007-05-18 17:04:05.000000000 -0400
-@@ -36,10 +36,10 @@
- %{!shared: %{pthread:-lpthread} \
-   %{profile:-lc_p} %{!profile: -lc}}"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
--#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
--#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKERN32 "/lib64/ld.so.1"
-+#define UCLIBC_DYNAMIC_LINKERN32 "/lib64/ld-uClibc.so.0"
- #define LINUX_DYNAMIC_LINKERN32 \
-   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
- 
-diff -Naur gcc-4.2.0.orig/gcc/config/mips/t-linux64 gcc-4.2.0/gcc/config/mips/t-linux64
---- gcc-4.2.0.orig/gcc/config/mips/t-linux64	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/mips/t-linux64	2007-05-18 17:05:40.000000000 -0400
-@@ -1,6 +1,6 @@
- MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
- MULTILIB_DIRNAMES = n32 32 64
--MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
-+MULTILIB_OSDIRNAMES = ../lib64 ../lib32 ../lib
- 
- EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
- 
-diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/linux64.h gcc-4.2.0/gcc/config/rs6000/linux64.h
---- gcc-4.2.0.orig/gcc/config/rs6000/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/rs6000/linux64.h	2007-05-18 17:04:05.000000000 -0400
-@@ -336,8 +336,8 @@
- #undef	LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
-+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
- #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
- #if UCLIBC_DEFAULT
-diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/t-linux64 gcc-4.2.0/gcc/config/rs6000/t-linux64
---- gcc-4.2.0.orig/gcc/config/rs6000/t-linux64	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/rs6000/t-linux64	2007-05-18 17:06:22.000000000 -0400
-@@ -12,7 +12,7 @@
- MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
- MULTILIB_EXCEPTIONS     = m64/msoft-float
- MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
--MULTILIB_OSDIRNAMES	= ../lib64 ../lib nof
-+MULTILIB_OSDIRNAMES	= ../lib ../lib32 nof
- MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
- 
- softfp_wrap_start := '\#ifndef __powerpc64__'
-diff -Naur gcc-4.2.0.orig/gcc/config/s390/t-linux64 gcc-4.2.0/gcc/config/s390/t-linux64
---- gcc-4.2.0.orig/gcc/config/s390/t-linux64	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/s390/t-linux64	2007-05-18 17:07:44.000000000 -0400
-@@ -1,6 +1,6 @@
- MULTILIB_OPTIONS = m64/m31
- MULTILIB_DIRNAMES = 64 32
--MULTILIB_OSDIRNAMES = ../lib64 ../lib
-+MULTILIB_OSDIRNAMES = ../lib ../lib32
- 
- LIBGCC = stmp-multilib
- INSTALL_LIBGCC = install-multilib
-diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux64.h gcc-4.2.0/gcc/config/sparc/linux64.h
---- gcc-4.2.0.orig/gcc/config/sparc/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/sparc/linux64.h	2007-05-18 17:04:05.000000000 -0400
-@@ -144,8 +144,8 @@
- 
- /* If ELF is the default format, we should not use /lib/elf.  */
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux.so.2"
- #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
- #if UCLIBC_DEFAULT
-@@ -167,7 +167,7 @@
-   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
-   { "link_arch",	 LINK_ARCH_SPEC },
- 
--#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
-+#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib32 %{shared:-shared} \
-   %{!shared: \
-     %{!ibcs: \
-       %{!static: \
-@@ -176,7 +176,7 @@
-         %{static:-static}}} \
- "
- 
--#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
-+#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib %{shared:-shared} \
-   %{!shared: \
-     %{!ibcs: \
-       %{!static: \
-@@ -257,7 +257,7 @@
- #else /* !SPARC_BI_ARCH */
- 
- #undef LINK_SPEC
--#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
-+#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib %{shared:-shared} \
-   %{!shared: \
-     %{!ibcs: \
-       %{!static: \
-diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux.h gcc-4.2.0/gcc/config/sparc/linux.h
---- gcc-4.2.0.orig/gcc/config/sparc/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/sparc/linux.h	2007-05-18 17:04:05.000000000 -0400
-@@ -133,7 +133,7 @@
- 
- 
- #undef  LINK_SPEC
--#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
-+#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib32 %{shared:-shared} \
-   %{!mno-relax:%{!r:-relax}} \
-   %{!shared: \
-     %{!ibcs: \
-diff -Naur gcc-4.2.0.orig/gcc/config/sparc/t-linux64 gcc-4.2.0/gcc/config/sparc/t-linux64
---- gcc-4.2.0.orig/gcc/config/sparc/t-linux64	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/sparc/t-linux64	2007-05-18 17:06:53.000000000 -0400
-@@ -1,6 +1,6 @@
- MULTILIB_OPTIONS = m64/m32
- MULTILIB_DIRNAMES = 64 32
--MULTILIB_OSDIRNAMES = ../lib64 ../lib
-+MULTILIB_OSDIRNAMES = ../lib ../lib32
- 
- LIBGCC = stmp-multilib
- INSTALL_LIBGCC = install-multilib
-@@ -10,4 +10,4 @@
- 
- CRTSTUFF_T_CFLAGS = `if test x$$($(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) \
- 				 -print-multi-os-directory) \
--			= x../lib64; then echo -mcmodel=medany; fi`
-+			= x../lib; then echo -mcmodel=medany; fi`
Index: patches/gcc-4.2.1-pure64_specs-1.patch
===================================================================
--- patches/gcc-4.2.1-pure64_specs-1.patch	(revision 78885f9d2b075eea96774d9383f1c2a2834a5445)
+++ 	(revision )
@@ -1,388 +1,0 @@
-Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
-Date: 2007-02-14
-Initial Package Version: 4.1.2
-Upstream Status: Not Sent - LFS Specific
-Origin: Idea originally developed by Ryan Oliver and Greg Schafer for
-        the Pure LFS project.
-        More architectures added by Zack Winkles.
-        Further fine tunings by Greg Schafer.
-        Rediffed against gcc 4.0.0 by Robert Connolly.
-        Rediffed against gcc 4.1.0 by Chris Staub
-        Rediffed against gcc 4.1.2 by Jim Gifford
-        Rediffed against gcc 4.2.0 by Joe Ciccone
-Description: This patch modifies the location of the dynamic linker for
-        the GCC Pass 2 build in LFS Chapter 5.
-
-diff -Naur gcc-4.2.0.orig/gcc/config/alpha/gnu.h gcc-4.2.0/gcc/config/alpha/gnu.h
---- gcc-4.2.0.orig/gcc/config/alpha/gnu.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/alpha/gnu.h	2007-05-18 16:27:10.000000000 -0400
-@@ -11,7 +11,7 @@
-     } while (0)
- 
- #undef ELF_DYNAMIC_LINKER
--#define ELF_DYNAMIC_LINKER	"/lib/ld.so"
-+#define ELF_DYNAMIC_LINKER	"/tools/lib/ld.so"
- 
- #undef	STARTFILE_SPEC
- #define STARTFILE_SPEC \
-diff -Naur gcc-4.2.0.orig/gcc/config/alpha/linux-elf.h gcc-4.2.0/gcc/config/alpha/linux-elf.h
---- gcc-4.2.0.orig/gcc/config/alpha/linux-elf.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/alpha/linux-elf.h	2007-05-18 16:23:31.000000000 -0400
-@@ -28,8 +28,8 @@
- #define SUBTARGET_EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
- 
--#define GLIBC_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER	"/tools/lib/ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
- #else
-diff -Naur gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h gcc-4.2.0/gcc/config/arm/linux-eabi.h
---- gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/arm/linux-eabi.h	2007-05-18 16:26:45.000000000 -0400
-@@ -53,7 +53,7 @@
- /* Use ld-linux.so.3 so that it will be possible to run "classic"
-    GNU/Linux binaries on an EABI system.  */
- #undef GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.3"
- 
- /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
-    use the GNU/Linux version, not the generic BPABI version.  */
-diff -Naur gcc-4.2.0.orig/gcc/config/arm/linux-elf.h gcc-4.2.0/gcc/config/arm/linux-elf.h
---- gcc-4.2.0.orig/gcc/config/arm/linux-elf.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/arm/linux-elf.h	2007-05-18 16:23:31.000000000 -0400
-@@ -51,7 +51,7 @@
- 
- #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
- 
- #define LINUX_TARGET_LINK_SPEC  "%{h*} %{version:-v} \
-    %{b} \
-diff -Naur gcc-4.2.0.orig/gcc/config/cris/linux.h gcc-4.2.0/gcc/config/cris/linux.h
---- gcc-4.2.0.orig/gcc/config/cris/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/cris/linux.h	2007-05-18 16:30:54.000000000 -0400
-@@ -76,7 +76,7 @@
- #undef CRIS_SUBTARGET_VERSION
- #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- /* We need an -rpath-link to ld.so.1, and presumably to each directory
-    specified with -B.  */
-dff -Naur gcc-4.2.0.orig/gcc/config/frv/linux.h gcc-4.2.0/gcc/config/frv/linux.h
---- gcc-4.2.0.orig/gcc/config/frv/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/frv/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -36,7 +36,7 @@
- #define ENDFILE_SPEC \
-   "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- #undef LINK_SPEC
- #define LINK_SPEC "\
-diff -Naur gcc-4.2.0.orig/gcc/config/i386/gnu.h gcc-4.2.0/gcc/config/i386/gnu.h
---- gcc-4.2.0.orig/gcc/config/i386/gnu.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/i386/gnu.h	2007-05-18 16:23:31.000000000 -0400
-@@ -22,7 +22,7 @@
-   %{!shared: \
-     %{!static: \
-       %{rdynamic:-export-dynamic} \
--      %{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
-+      %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so}} \
-     %{static:-static}}"
- 
- #undef	STARTFILE_SPEC
-diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux64.h gcc-4.2.0/gcc/config/i386/linux64.h
---- gcc-4.2.0.orig/gcc/config/i386/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/i386/linux64.h	2007-05-18 16:23:31.000000000 -0400
-@@ -49,8 +49,8 @@
-    When the -shared link option is used a final link is not being
-    done.  */
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld-linux-x86-64.so.2"
- 
- #undef	LINK_SPEC
- #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
-diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux.h gcc-4.2.0/gcc/config/i386/linux.h
---- gcc-4.2.0.orig/gcc/config/i386/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/i386/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -101,7 +101,7 @@
- 
- /* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
- #define LINK_EMULATION "elf_i386"
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
- 
- #undef  SUBTARGET_EXTRA_SPECS
- #define SUBTARGET_EXTRA_SPECS \
-diff -Naur gcc-4.2.0.orig/gcc/config/ia64/linux.h gcc-4.2.0/gcc/config/ia64/linux.h
---- gcc-4.2.0.orig/gcc/config/ia64/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/ia64/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -37,7 +37,7 @@
- /* Define this for shared library support because it isn't in the main
-    linux.h file.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux-ia64.so.2"
- 
- #undef LINK_SPEC
- #define LINK_SPEC "\
-diff -Naur gcc-4.2.0.orig/gcc/config/linux.h gcc-4.2.0/gcc/config/linux.h
---- gcc-4.2.0.orig/gcc/config/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -112,9 +112,9 @@
-    GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
-    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
-    supporting both 32-bit and 64-bit compilation.  */
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
- #define LINUX_DYNAMIC_LINKER \
-   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
- #define LINUX_DYNAMIC_LINKER32 \
-@@ -127,3 +127,7 @@
- #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
- 
- #define TARGET_POSIX_IO
-+
-+/* Remove /usr/include from the end of the include search path.  */
-+#undef STANDARD_INCLUDE_DIR
-+#define STANDARD_INCLUDE_DIR 0
-diff -Naur gcc-4.2.0.orig/gcc/config/m32r/linux.h gcc-4.2.0/gcc/config/m32r/linux.h
---- gcc-4.2.0.orig/gcc/config/m32r/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/m32r/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -59,7 +59,7 @@
- 
- /* If ELF is the default format, we should not use /lib/elf.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
- 
- #undef	LINK_SPEC
- #if TARGET_LITTLE_ENDIAN
-diff -Naur gcc-4.2.0.orig/gcc/config/m68k/linux.h gcc-4.2.0/gcc/config/m68k/linux.h
---- gcc-4.2.0.orig/gcc/config/m68k/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/m68k/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -123,7 +123,7 @@
- 
- /* If ELF is the default format, we should not use /lib/elf.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- #undef	LINK_SPEC
- #define LINK_SPEC "-m m68kelf %{shared} \
-diff -Naur gcc-4.2.0.orig/gcc/config/mips/linux64.h gcc-4.2.0/gcc/config/mips/linux64.h
---- gcc-4.2.0.orig/gcc/config/mips/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/mips/linux64.h	2007-05-18 16:23:31.000000000 -0400
-@@ -36,10 +36,10 @@
- %{!shared: %{pthread:-lpthread} \
-   %{profile:-lc_p} %{!profile: -lc}}"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
--#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
--#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKERN32 "/tools/lib64/ld.so.1"
-+#define UCLIBC_DYNAMIC_LINKERN32 "/tools/lib64/ld-uClibc.so.0"
- #define LINUX_DYNAMIC_LINKERN32 \
-   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
- 
-diff -Naur gcc-4.2.0.orig/gcc/config/mips/linux.h gcc-4.2.0/gcc/config/mips/linux.h
---- gcc-4.2.0.orig/gcc/config/mips/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/mips/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -104,7 +104,7 @@
- #undef MIPS_DEFAULT_GVALUE
- #define MIPS_DEFAULT_GVALUE 0
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- /* Borrowed from sparc/linux.h */
- #undef LINK_SPEC
-diff -Naur gcc-4.2.0.orig/gcc/config/mn10300/linux.h gcc-4.2.0/gcc/config/mn10300/linux.h
---- gcc-4.2.0.orig/gcc/config/mn10300/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/mn10300/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -33,7 +33,7 @@
- #undef  ASM_SPEC
- #define ASM_SPEC "%{Wa,*:%*}"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- #undef  LINK_SPEC
- #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
-diff -Naur gcc-4.2.0.orig/gcc/config/pa/pa-linux.h gcc-4.2.0/gcc/config/pa/pa-linux.h
---- gcc-4.2.0.orig/gcc/config/pa/pa-linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/pa/pa-linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -45,7 +45,7 @@
- /* Define this for shared library support because it isn't in the main
-    linux.h file.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- #undef LINK_SPEC
- #define LINK_SPEC "\
-diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/linux64.h gcc-4.2.0/gcc/config/rs6000/linux64.h
---- gcc-4.2.0.orig/gcc/config/rs6000/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/rs6000/linux64.h	2007-05-18 16:23:31.000000000 -0400
-@@ -336,10 +336,10 @@
- #undef	LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64.so.1"
-+#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
- #else
-diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/sysv4.h gcc-4.2.0/gcc/config/rs6000/sysv4.h
---- gcc-4.2.0.orig/gcc/config/rs6000/sysv4.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/rs6000/sysv4.h	2007-05-18 16:29:05.000000000 -0400
-@@ -892,8 +892,8 @@
- 
- #define LINK_START_LINUX_SPEC ""
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
-+#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
- #else
-@@ -935,7 +935,7 @@
- 
- #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
-   %{rdynamic:-export-dynamic} \
--  %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
-+  %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
- 
- #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__	\
- %{!undef:					                \
-diff -Naur gcc-4.2.0.orig/gcc/config/s390/linux.h gcc-4.2.0/gcc/config/s390/linux.h
---- gcc-4.2.0.orig/gcc/config/s390/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/s390/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -73,8 +73,8 @@
- #define MULTILIB_DEFAULTS { "m31" }
- #endif
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
-+#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64.so.1"
- 
- #undef  LINK_SPEC
- #define LINK_SPEC \
-diff -Naur gcc-4.2.0.orig/gcc/config/sh/linux.h gcc-4.2.0/gcc/config/sh/linux.h
---- gcc-4.2.0.orig/gcc/config/sh/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/sh/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -48,7 +48,7 @@
- 
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
- 
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
-diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux64.h gcc-4.2.0/gcc/config/sparc/linux64.h
---- gcc-4.2.0.orig/gcc/config/sparc/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/sparc/linux64.h	2007-05-18 16:25:23.000000000 -0400
-@@ -144,10 +144,10 @@
- 
- /* If ELF is the default format, we should not use /lib/elf.  */
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
- #else
-@@ -167,7 +167,7 @@
-   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
-   { "link_arch",	 LINK_ARCH_SPEC },
- 
--#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
-+#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/tools/lib32 %{shared:-shared} \
-   %{!shared: \
-     %{!ibcs: \
-       %{!static: \
-@@ -176,7 +176,7 @@
-         %{static:-static}}} \
- "
- 
--#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
-+#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/tools/lib %{shared:-shared} \
-   %{!shared: \
-     %{!ibcs: \
-       %{!static: \
-@@ -257,7 +257,7 @@
- #else /* !SPARC_BI_ARCH */
- 
- #undef LINK_SPEC
--#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
-+#define LINK_SPEC "-m elf64_sparc -Y P,/tools/lib %{shared:-shared} \
-   %{!shared: \
-     %{!ibcs: \
-       %{!static: \
-diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux.h gcc-4.2.0/gcc/config/sparc/linux.h
---- gcc-4.2.0.orig/gcc/config/sparc/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/sparc/linux.h	2007-05-18 16:24:24.000000000 -0400
-@@ -121,8 +121,8 @@
- 
- /* If ELF is the default format, we should not use /lib/elf.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
- #else
-@@ -133,7 +133,7 @@
- 
- 
- #undef  LINK_SPEC
--#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
-+#define LINK_SPEC "-m elf32_sparc -Y P,/tools/lib32 %{shared:-shared} \
-   %{!mno-relax:%{!r:-relax}} \
-   %{!shared: \
-     %{!ibcs: \
-diff -Naur gcc-4.2.0.orig/gcc/config/xtensa/linux.h gcc-4.2.0/gcc/config/xtensa/linux.h
---- gcc-4.2.0.orig/gcc/config/xtensa/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/xtensa/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -43,7 +43,7 @@
-   %{mlongcalls:--longcalls} \
-   %{mno-longcalls:--no-longcalls}"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- #undef LINK_SPEC
- #define LINK_SPEC \
Index: patches/gcc-4.2.1-specs-1.patch
===================================================================
--- patches/gcc-4.2.1-specs-1.patch	(revision 78885f9d2b075eea96774d9383f1c2a2834a5445)
+++ 	(revision )
@@ -1,388 +1,0 @@
-Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
-Date: 2007-02-14
-Initial Package Version: 4.1.2
-Upstream Status: Not Sent - LFS Specific
-Origin: Idea originally developed by Ryan Oliver and Greg Schafer for
-        the Pure LFS project.
-        More architectures added by Zack Winkles.
-        Further fine tunings by Greg Schafer.
-        Rediffed against gcc 4.0.0 by Robert Connolly.
-        Rediffed against gcc 4.1.0 by Chris Staub
-        Rediffed against gcc 4.1.2 by Jim Gifford
-        Rediffed against gcc 4.2.0 by Joe Ciccone
-Description: This patch modifies the location of the dynamic linker for
-        the GCC Pass 2 build in LFS Chapter 5.
-
-diff -Naur gcc-4.2.0.orig/gcc/config/alpha/gnu.h gcc-4.2.0/gcc/config/alpha/gnu.h
---- gcc-4.2.0.orig/gcc/config/alpha/gnu.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/alpha/gnu.h	2007-05-18 16:27:10.000000000 -0400
-@@ -11,7 +11,7 @@
-     } while (0)
- 
- #undef ELF_DYNAMIC_LINKER
--#define ELF_DYNAMIC_LINKER	"/lib/ld.so"
-+#define ELF_DYNAMIC_LINKER	"/tools/lib/ld.so"
- 
- #undef	STARTFILE_SPEC
- #define STARTFILE_SPEC \
-diff -Naur gcc-4.2.0.orig/gcc/config/alpha/linux-elf.h gcc-4.2.0/gcc/config/alpha/linux-elf.h
---- gcc-4.2.0.orig/gcc/config/alpha/linux-elf.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/alpha/linux-elf.h	2007-05-18 16:23:31.000000000 -0400
-@@ -28,8 +28,8 @@
- #define SUBTARGET_EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
- 
--#define GLIBC_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER	"/tools/lib/ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
- #else
-diff -Naur gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h gcc-4.2.0/gcc/config/arm/linux-eabi.h
---- gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/arm/linux-eabi.h	2007-05-18 16:26:45.000000000 -0400
-@@ -53,7 +53,7 @@
- /* Use ld-linux.so.3 so that it will be possible to run "classic"
-    GNU/Linux binaries on an EABI system.  */
- #undef GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.3"
- 
- /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
-    use the GNU/Linux version, not the generic BPABI version.  */
-diff -Naur gcc-4.2.0.orig/gcc/config/arm/linux-elf.h gcc-4.2.0/gcc/config/arm/linux-elf.h
---- gcc-4.2.0.orig/gcc/config/arm/linux-elf.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/arm/linux-elf.h	2007-05-18 16:23:31.000000000 -0400
-@@ -51,7 +51,7 @@
- 
- #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
- 
- #define LINUX_TARGET_LINK_SPEC  "%{h*} %{version:-v} \
-    %{b} \
-diff -Naur gcc-4.2.0.orig/gcc/config/cris/linux.h gcc-4.2.0/gcc/config/cris/linux.h
---- gcc-4.2.0.orig/gcc/config/cris/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/cris/linux.h	2007-05-18 16:30:54.000000000 -0400
-@@ -76,7 +76,7 @@
- #undef CRIS_SUBTARGET_VERSION
- #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- /* We need an -rpath-link to ld.so.1, and presumably to each directory
-    specified with -B.  */
-diff -Naur gcc-4.2.0.orig/gcc/config/frv/linux.h gcc-4.2.0/gcc/config/frv/linux.h
---- gcc-4.2.0.orig/gcc/config/frv/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/frv/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -36,7 +36,7 @@
- #define ENDFILE_SPEC \
-   "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- #undef LINK_SPEC
- #define LINK_SPEC "\
-diff -Naur gcc-4.2.0.orig/gcc/config/i386/gnu.h gcc-4.2.0/gcc/config/i386/gnu.h
---- gcc-4.2.0.orig/gcc/config/i386/gnu.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/i386/gnu.h	2007-05-18 16:23:31.000000000 -0400
-@@ -22,7 +22,7 @@
-   %{!shared: \
-     %{!static: \
-       %{rdynamic:-export-dynamic} \
--      %{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
-+      %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so}} \
-     %{static:-static}}"
- 
- #undef	STARTFILE_SPEC
-diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux64.h gcc-4.2.0/gcc/config/i386/linux64.h
---- gcc-4.2.0.orig/gcc/config/i386/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/i386/linux64.h	2007-05-18 16:23:31.000000000 -0400
-@@ -49,8 +49,8 @@
-    When the -shared link option is used a final link is not being
-    done.  */
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld-linux-x86-64.so.2"
- 
- #undef	LINK_SPEC
- #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
-diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux.h gcc-4.2.0/gcc/config/i386/linux.h
---- gcc-4.2.0.orig/gcc/config/i386/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/i386/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -101,7 +101,7 @@
- 
- /* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
- #define LINK_EMULATION "elf_i386"
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
- 
- #undef  SUBTARGET_EXTRA_SPECS
- #define SUBTARGET_EXTRA_SPECS \
-diff -Naur gcc-4.2.0.orig/gcc/config/ia64/linux.h gcc-4.2.0/gcc/config/ia64/linux.h
---- gcc-4.2.0.orig/gcc/config/ia64/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/ia64/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -37,7 +37,7 @@
- /* Define this for shared library support because it isn't in the main
-    linux.h file.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux-ia64.so.2"
- 
- #undef LINK_SPEC
- #define LINK_SPEC "\
-diff -Naur gcc-4.2.0.orig/gcc/config/linux.h gcc-4.2.0/gcc/config/linux.h
---- gcc-4.2.0.orig/gcc/config/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -112,9 +112,9 @@
-    GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
-    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
-    supporting both 32-bit and 64-bit compilation.  */
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
- #define LINUX_DYNAMIC_LINKER \
-   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
- #define LINUX_DYNAMIC_LINKER32 \
-@@ -127,3 +127,7 @@
- #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
- 
- #define TARGET_POSIX_IO
-+
-+/* Remove /usr/include from the end of the include search path.  */
-+#undef STANDARD_INCLUDE_DIR
-+#define STANDARD_INCLUDE_DIR 0
-diff -Naur gcc-4.2.0.orig/gcc/config/m32r/linux.h gcc-4.2.0/gcc/config/m32r/linux.h
---- gcc-4.2.0.orig/gcc/config/m32r/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/m32r/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -59,7 +59,7 @@
- 
- /* If ELF is the default format, we should not use /lib/elf.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
- 
- #undef	LINK_SPEC
- #if TARGET_LITTLE_ENDIAN
-diff -Naur gcc-4.2.0.orig/gcc/config/m68k/linux.h gcc-4.2.0/gcc/config/m68k/linux.h
---- gcc-4.2.0.orig/gcc/config/m68k/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/m68k/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -123,7 +123,7 @@
- 
- /* If ELF is the default format, we should not use /lib/elf.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- #undef	LINK_SPEC
- #define LINK_SPEC "-m m68kelf %{shared} \
-diff -Naur gcc-4.2.0.orig/gcc/config/mips/linux64.h gcc-4.2.0/gcc/config/mips/linux64.h
---- gcc-4.2.0.orig/gcc/config/mips/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/mips/linux64.h	2007-05-18 16:23:31.000000000 -0400
-@@ -36,10 +36,10 @@
- %{!shared: %{pthread:-lpthread} \
-   %{profile:-lc_p} %{!profile: -lc}}"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
--#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
--#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKERN32 "/tools/lib32/ld.so.1"
-+#define UCLIBC_DYNAMIC_LINKERN32 "/tools/lib32/ld-uClibc.so.0"
- #define LINUX_DYNAMIC_LINKERN32 \
-   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
- 
-diff -Naur gcc-4.2.0.orig/gcc/config/mips/linux.h gcc-4.2.0/gcc/config/mips/linux.h
---- gcc-4.2.0.orig/gcc/config/mips/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/mips/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -104,7 +104,7 @@
- #undef MIPS_DEFAULT_GVALUE
- #define MIPS_DEFAULT_GVALUE 0
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- /* Borrowed from sparc/linux.h */
- #undef LINK_SPEC
-diff -Naur gcc-4.2.0.orig/gcc/config/mn10300/linux.h gcc-4.2.0/gcc/config/mn10300/linux.h
---- gcc-4.2.0.orig/gcc/config/mn10300/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/mn10300/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -33,7 +33,7 @@
- #undef  ASM_SPEC
- #define ASM_SPEC "%{Wa,*:%*}"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- #undef  LINK_SPEC
- #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
-diff -Naur gcc-4.2.0.orig/gcc/config/pa/pa-linux.h gcc-4.2.0/gcc/config/pa/pa-linux.h
---- gcc-4.2.0.orig/gcc/config/pa/pa-linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/pa/pa-linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -45,7 +45,7 @@
- /* Define this for shared library support because it isn't in the main
-    linux.h file.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- #undef LINK_SPEC
- #define LINK_SPEC "\
-diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/linux64.h gcc-4.2.0/gcc/config/rs6000/linux64.h
---- gcc-4.2.0.orig/gcc/config/rs6000/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/rs6000/linux64.h	2007-05-18 16:23:31.000000000 -0400
-@@ -336,10 +336,10 @@
- #undef	LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld64.so.1"
-+#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
- #else
-diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/sysv4.h gcc-4.2.0/gcc/config/rs6000/sysv4.h
---- gcc-4.2.0.orig/gcc/config/rs6000/sysv4.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/rs6000/sysv4.h	2007-05-18 16:29:05.000000000 -0400
-@@ -892,8 +892,8 @@
- 
- #define LINK_START_LINUX_SPEC ""
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
-+#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
- #else
-@@ -935,7 +935,7 @@
- 
- #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
-   %{rdynamic:-export-dynamic} \
--  %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
-+  %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
- 
- #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__	\
- %{!undef:					                \
-diff -Naur gcc-4.2.0.orig/gcc/config/s390/linux.h gcc-4.2.0/gcc/config/s390/linux.h
---- gcc-4.2.0.orig/gcc/config/s390/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/s390/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -73,8 +73,8 @@
- #define MULTILIB_DEFAULTS { "m31" }
- #endif
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
-+#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64.so.1"
- 
- #undef  LINK_SPEC
- #define LINK_SPEC \
-diff -Naur gcc-4.2.0.orig/gcc/config/sh/linux.h gcc-4.2.0/gcc/config/sh/linux.h
---- gcc-4.2.0.orig/gcc/config/sh/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/sh/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -48,7 +48,7 @@
- 
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
- 
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
-diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux64.h gcc-4.2.0/gcc/config/sparc/linux64.h
---- gcc-4.2.0.orig/gcc/config/sparc/linux64.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/sparc/linux64.h	2007-05-18 16:25:23.000000000 -0400
-@@ -144,10 +144,10 @@
- 
- /* If ELF is the default format, we should not use /lib/elf.  */
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
- #else
-@@ -167,7 +167,7 @@
-   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
-   { "link_arch",	 LINK_ARCH_SPEC },
- 
--#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
-+#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/tools/lib %{shared:-shared} \
-   %{!shared: \
-     %{!ibcs: \
-       %{!static: \
-@@ -176,7 +176,7 @@
-         %{static:-static}}} \
- "
- 
--#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
-+#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/tools/lib64 %{shared:-shared} \
-   %{!shared: \
-     %{!ibcs: \
-       %{!static: \
-@@ -257,7 +257,7 @@
- #else /* !SPARC_BI_ARCH */
- 
- #undef LINK_SPEC
--#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
-+#define LINK_SPEC "-m elf64_sparc -Y P,/tools/lib64 %{shared:-shared} \
-   %{!shared: \
-     %{!ibcs: \
-       %{!static: \
-diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux.h gcc-4.2.0/gcc/config/sparc/linux.h
---- gcc-4.2.0.orig/gcc/config/sparc/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/sparc/linux.h	2007-05-18 16:24:24.000000000 -0400
-@@ -121,8 +121,8 @@
- 
- /* If ELF is the default format, we should not use /lib/elf.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
- #else
-@@ -133,7 +133,7 @@
- 
- 
- #undef  LINK_SPEC
--#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
-+#define LINK_SPEC "-m elf32_sparc -Y P,/tools/lib %{shared:-shared} \
-   %{!mno-relax:%{!r:-relax}} \
-   %{!shared: \
-     %{!ibcs: \
-diff -Naur gcc-4.2.0.orig/gcc/config/xtensa/linux.h gcc-4.2.0/gcc/config/xtensa/linux.h
---- gcc-4.2.0.orig/gcc/config/xtensa/linux.h	2007-05-16 19:21:19.000000000 -0400
-+++ gcc-4.2.0/gcc/config/xtensa/linux.h	2007-05-18 16:23:31.000000000 -0400
-@@ -43,7 +43,7 @@
-   %{mlongcalls:--longcalls} \
-   %{mno-longcalls:--no-longcalls}"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
- 
- #undef LINK_SPEC
- #define LINK_SPEC \
Index: patches/gcc-4.2.2-cross_search_paths-1.patch
===================================================================
--- patches/gcc-4.2.2-cross_search_paths-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
+++ patches/gcc-4.2.2-cross_search_paths-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
@@ -0,0 +1,51 @@
+Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
+Date: 2007-02-14
+Initial Package Version: 4.2.0
+Origin: Ryan Oliver (issue reported by Erik-Jan Post)
+        Rediffed against 4.1.0 by Chris Staub
+        Rediffed against 4.1.2 by Jim Gifford
+	Rediffed against 4.2.0 by Joe Ciccone
+Upstream Status: N/A
+Description:
+  Removes standard_exec_prefix_2 from library search path when cross-compiling.
+  Removes both standard_exec_prefix_1 and standard_exec_prefix_2 from the gcc
+  executable search path when cross-compiling.
+
+  ie: if cross_compile = 1 in the specs file, do not
+      - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} to the library search path
+      - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} or
+                   /usr/libexec/gcc/${TARGET}/${GCC_VER}
+        to the executable search path
+
+  This avoids the possibility of linking in libraries from the host if they
+  exist under those directories.
+
+diff -Naur gcc-4.2.0.orig/gcc/gcc.c gcc-4.2.0/gcc/gcc.c
+--- gcc-4.2.0.orig/gcc/gcc.c	2007-05-16 19:21:26.000000000 -0400
++++ gcc-4.2.0/gcc/gcc.c	2007-05-16 19:22:10.000000000 -0400
+@@ -3949,16 +3949,22 @@
+ 	      PREFIX_PRIORITY_LAST, 2, 0);
+   add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
+ 	      PREFIX_PRIORITY_LAST, 2, 0);
+-  add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
++  if (*cross_compile == '0')
++    {
++      add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
+ 	      PREFIX_PRIORITY_LAST, 2, 0);
+-  add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
++      add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
+ 	      PREFIX_PRIORITY_LAST, 2, 0);
++    }
+ #endif
+ 
+   add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
+ 	      PREFIX_PRIORITY_LAST, 1, 0);
+-  add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
++  if (*cross_compile == '0')
++    {
++      add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
+ 	      PREFIX_PRIORITY_LAST, 1, 0);
++    }
+ 
+   tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
+ 			   dir_separator_str, NULL);
Index: patches/gcc-4.2.2-posix-1.patch
===================================================================
--- patches/gcc-4.2.2-posix-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
+++ patches/gcc-4.2.2-posix-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
@@ -0,0 +1,296 @@
+Submitted By: Jim Gifford (patches at jg555 dot com)
+Date: 2007-02-14
+Initial Package Version: 4.1.2
+Origin: Jim Gifford
+        Rediffed against 4.1.0 by Chris Staub
+        Rediffed against 4.1.2 by Jim Gifford
+	Rediffed and additions against 4.2.0 by Joe Ciccone
+Upstream Status: On Hold
+Description: Makes GCC Posix Compliant
+
+diff -Naur gcc-4.2.0.orig/contrib/test_summary gcc-4.2.0/contrib/test_summary
+--- gcc-4.2.0.orig/contrib/test_summary	2007-05-16 19:21:35.000000000 -0400
++++ gcc-4.2.0/contrib/test_summary	2007-05-18 16:38:48.000000000 -0400
+@@ -106,7 +106,7 @@
+     srcdir = configflags;
+     sub(/\/configure .*/, "", srcdir);
+     printf "LAST_UPDATED: ";
+-    system("tail -1 " srcdir "/LAST_UPDATED");
++    system("tail -n 1 " srcdir "/LAST_UPDATED");
+     print "";
+ 
+     sub(/^[^ ]*\/configure */, " ", configflags);
+diff -Naur gcc-4.2.0.orig/gcc/configure.ac gcc-4.2.0/gcc/configure.ac
+--- gcc-4.2.0.orig/gcc/configure.ac	2007-05-16 19:21:23.000000000 -0400
++++ gcc-4.2.0/gcc/configure.ac	2007-05-18 16:39:21.000000000 -0400
+@@ -2227,7 +2227,7 @@
+   # Therefore, use diff -b for the comparisons.
+   if test x$gcc_cv_objdump != x \
+   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
+-     | tail -3 > conftest.got \
++     | tail -n 3 > conftest.got \
+   && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
+     || diff -b conftest.big conftest.got > /dev/null 2>&1; }
+   then
+diff -Naur gcc-4.2.0.orig/gcc/configure gcc-4.2.0/gcc/configure
+--- gcc-4.2.0.orig/gcc/configure	2007-05-16 19:21:26.000000000 -0400
++++ gcc-4.2.0/gcc/configure	2007-05-18 16:39:10.000000000 -0400
+@@ -14120,7 +14120,7 @@
+   # Therefore, use diff -b for the comparisons.
+   if test x$gcc_cv_objdump != x \
+   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
+-     | tail -3 > conftest.got \
++     | tail -n 3 > conftest.got \
+   && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
+     || diff -b conftest.big conftest.got > /dev/null 2>&1; }
+   then
+diff -Naur gcc-4.2.0.orig/gcc/testsuite/ada/acats/run_all.sh gcc-4.2.0/gcc/testsuite/ada/acats/run_all.sh
+--- gcc-4.2.0.orig/gcc/testsuite/ada/acats/run_all.sh	2007-05-16 19:21:20.000000000 -0400
++++ gcc-4.2.0/gcc/testsuite/ada/acats/run_all.sh	2007-05-18 16:44:02.000000000 -0400
+@@ -68,7 +68,7 @@
+   ls ${i}?.adb > ${i}.lst 2> /dev/null
+   ls ${i}*m.adb >> ${i}.lst 2> /dev/null
+   ls ${i}.adb >> ${i}.lst 2> /dev/null
+-  main=`tail -1 ${i}.lst`
++  main=`tail -n 1 ${i}.lst`
+ }
+ 
+ EXTERNAL_OBJECTS=""
+diff -Naur gcc-4.2.0.orig/libgomp/acinclude.m4 gcc-4.2.0/libgomp/acinclude.m4
+--- gcc-4.2.0.orig/libgomp/acinclude.m4	2007-05-16 19:21:18.000000000 -0400
++++ gcc-4.2.0/libgomp/acinclude.m4	2007-05-18 16:42:11.000000000 -0400
+@@ -147,7 +147,7 @@
+   # Start by getting the version number.  I think the libtool test already
+   # does some of this, but throws away the result.
+   changequote(,)
+-  ldver=`$LD --version 2>/dev/null | head -1 | \
++  ldver=`$LD --version 2>/dev/null | head -n 1 | \
+          sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+   changequote([,])
+   libgomp_gnu_ld_version=`echo $ldver | \
+diff -Naur gcc-4.2.0.orig/libgomp/configure gcc-4.2.0/libgomp/configure
+--- gcc-4.2.0.orig/libgomp/configure	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/libgomp/configure	2007-05-18 16:42:19.000000000 -0400
+@@ -9314,7 +9314,7 @@
+   # Start by getting the version number.  I think the libtool test already
+   # does some of this, but throws away the result.
+ 
+-  ldver=`$LD --version 2>/dev/null | head -1 | \
++  ldver=`$LD --version 2>/dev/null | head -n 1 | \
+          sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+   libgomp_gnu_ld_version=`echo $ldver | \
+diff -Naur gcc-4.2.0.orig/libjava/classpath/m4/ax_create_stdint_h.m4 gcc-4.2.0/libjava/classpath/m4/ax_create_stdint_h.m4
+--- gcc-4.2.0.orig/libjava/classpath/m4/ax_create_stdint_h.m4	2007-05-16 19:21:35.000000000 -0400
++++ gcc-4.2.0/libjava/classpath/m4/ax_create_stdint_h.m4	2007-05-18 16:43:26.000000000 -0400
+@@ -217,7 +217,7 @@
+ fi # shortcircut to system "stdint.h"
+ # ------------------ PREPARE VARIABLES ------------------------------
+ if test "$GCC" = "yes" ; then
+-ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
++ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1`
+ else
+ ac_cv_stdint_message="using $CC"
+ fi
+diff -Naur gcc-4.2.0.orig/libjava/classpath/configure gcc-4.2.0/libjava/classpath/configure
+--- gcc-4.2.0.orig/libjava/classpath/configure	2007-05-16 19:21:35.000000000 -0400
++++ gcc-4.2.0/libjava/classpath/configure	2007-05-18 16:43:09.000000000 -0400
+@@ -18514,7 +18514,7 @@
+ fi # shortcircut to system "stdint.h"
+ # ------------------ PREPARE VARIABLES ------------------------------
+ if test "$GCC" = "yes" ; then
+-ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
++ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1`
+ else
+ ac_cv_stdint_message="using $CC"
+ fi
+diff -Naur gcc-4.2.0.orig/libjava/classpath/ltcf-c.sh gcc-4.2.0/libjava/classpath/ltcf-c.sh
+--- gcc-4.2.0.orig/libjava/classpath/ltcf-c.sh	2007-05-16 19:21:31.000000000 -0400
++++ gcc-4.2.0/libjava/classpath/ltcf-c.sh	2007-05-18 16:42:36.000000000 -0400
+@@ -153,7 +153,7 @@
+     # If the export-symbols file already is a .def file (1st line
+     # is EXPORTS), use it as is.
+     # If DATA tags from a recent dlltool are present, honour them!
+-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
++    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname-def;
+       else
+         echo EXPORTS > $output_objdir/$soname-def;
+diff -Naur gcc-4.2.0.orig/libjava/classpath/ltcf-gcj.sh gcc-4.2.0/libjava/classpath/ltcf-gcj.sh
+--- gcc-4.2.0.orig/libjava/classpath/ltcf-gcj.sh	2007-05-16 19:21:34.000000000 -0400
++++ gcc-4.2.0/libjava/classpath/ltcf-gcj.sh	2007-05-18 16:42:45.000000000 -0400
+@@ -156,7 +156,7 @@
+     # If the export-symbols file already is a .def file (1st line
+     # is EXPORTS), use it as is.
+     # If DATA tags from a recent dlltool are present, honour them!
+-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
++    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname-def;
+       else
+         echo EXPORTS > $output_objdir/$soname-def;
+diff -Naur gcc-4.2.0.orig/libjava/mingwld.m4 gcc-4.2.0/libjava/mingwld.m4
+--- gcc-4.2.0.orig/libjava/mingwld.m4	2007-05-16 19:21:29.000000000 -0400
++++ gcc-4.2.0/libjava/mingwld.m4	2007-05-18 16:40:06.000000000 -0400
+@@ -3,8 +3,8 @@
+ AC_MSG_CHECKING(whether 'ld' is at least 2.13)
+ LD_PROG=`$CC --print-prog-name=ld`
+ LD_VERSION=`$LD_PROG --version`
+-LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
+-LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
++LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
++LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
+ if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
+   LD_OK="ok"
+ else
+diff -Naur gcc-4.2.0.orig/libjava/configure gcc-4.2.0/libjava/configure
+--- gcc-4.2.0.orig/libjava/configure	2007-05-16 19:21:29.000000000 -0400
++++ gcc-4.2.0/libjava/configure	2007-05-18 16:39:43.000000000 -0400
+@@ -7025,8 +7025,8 @@
+ echo $ECHO_N "checking whether 'ld' is at least 2.13... $ECHO_C" >&6
+ LD_PROG=`$CC --print-prog-name=ld`
+ LD_VERSION=`$LD_PROG --version`
+-LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
+-LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
++LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
++LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
+ if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
+   LD_OK="ok"
+ else
+diff -Naur gcc-4.2.0.orig/libstdc++-v3/acinclude.m4 gcc-4.2.0/libstdc++-v3/acinclude.m4
+--- gcc-4.2.0.orig/libstdc++-v3/acinclude.m4	2007-05-16 19:21:35.000000000 -0400
++++ gcc-4.2.0/libstdc++-v3/acinclude.m4	2007-05-18 16:40:37.000000000 -0400
+@@ -234,7 +234,7 @@
+   if test x"$with_gnu_ld" = x"yes"; then
+     AC_MSG_CHECKING([for ld version])
+     changequote(,)
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+     changequote([,])
+     glibcxx_gnu_ld_version=`echo $ldver | \
+diff -Naur gcc-4.2.0.orig/libstdc++-v3/configure gcc-4.2.0/libstdc++-v3/configure
+--- gcc-4.2.0.orig/libstdc++-v3/configure	2007-05-16 19:21:36.000000000 -0400
++++ gcc-4.2.0/libstdc++-v3/configure	2007-05-18 16:41:04.000000000 -0400
+@@ -8377,7 +8377,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -54289,7 +54289,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -75651,7 +75651,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -77176,7 +77176,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -78669,7 +78669,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -100561,7 +100561,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -101408,7 +101408,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -102811,7 +102811,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -104606,7 +104606,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -105851,7 +105851,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -106880,7 +106880,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+diff -Naur gcc-4.2.0.orig/ltcf-c.sh gcc-4.2.0/ltcf-c.sh
+--- gcc-4.2.0.orig/ltcf-c.sh	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/ltcf-c.sh	2007-05-18 16:41:18.000000000 -0400
+@@ -153,7 +153,7 @@
+     # If the export-symbols file already is a .def file (1st line
+     # is EXPORTS), use it as is.
+     # If DATA tags from a recent dlltool are present, honour them!
+-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
++    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname-def;
+       else
+         echo EXPORTS > $output_objdir/$soname-def;
+diff -Naur gcc-4.2.0.orig/ltcf-gcj.sh gcc-4.2.0/ltcf-gcj.sh
+--- gcc-4.2.0.orig/ltcf-gcj.sh	2007-05-16 19:21:35.000000000 -0400
++++ gcc-4.2.0/ltcf-gcj.sh	2007-05-18 16:41:29.000000000 -0400
+@@ -156,7 +156,7 @@
+     # If the export-symbols file already is a .def file (1st line
+     # is EXPORTS), use it as is.
+     # If DATA tags from a recent dlltool are present, honour them!
+-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
++    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname-def;
+       else
+         echo EXPORTS > $output_objdir/$soname-def;
Index: patches/gcc-4.2.2-powerpc64_multilib-1.patch
===================================================================
--- patches/gcc-4.2.2-powerpc64_multilib-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
+++ patches/gcc-4.2.2-powerpc64_multilib-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
@@ -0,0 +1,57 @@
+Submitted By: Ken Moffat (ken at linuxfromscratch dot org)
+Origin: fedora
+        Rediffed against 4.1.0 by Chris Staub
+	Rediffed against 4.2.0 by Joe Ciccone
+Date: 2005-11-22
+Initial package version: 4.0.2
+Description: In a native ppc64 build, this fixes a linkage failure while
+installing a 32-bit nof/ (no -hardware- floating point) library, and also gets
+rid of 1500 failures in the g++ testsuite.  From fedora gcc-4.0.1, rediffed to
+apply with -p1.
+
+diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/t-linux64 gcc-4.2.0/gcc/config/rs6000/t-linux64
+--- gcc-4.2.0.orig/gcc/config/rs6000/t-linux64	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/rs6000/t-linux64	2007-05-16 19:51:48.000000000 -0400
+@@ -7,13 +7,13 @@
+ 
+ TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc
+ 
+-MULTILIB_OPTIONS        = m64/m32 msoft-float
+-MULTILIB_DIRNAMES       = 64 32 nof
++MULTILIB_OPTIONS        = m64/m32
++MULTILIB_DIRNAMES       = 64 32
+ MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
+-MULTILIB_EXCEPTIONS     = m64/msoft-float
+-MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
+-MULTILIB_OSDIRNAMES	= ../lib64 ../lib nof
+-MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
++MULTILIB_EXCEPTIONS     =
++MULTILIB_EXCLUSIONS     =
++MULTILIB_OSDIRNAMES	= ../lib64 ../lib
++MULTILIB_MATCHES        =
+ 
+ softfp_wrap_start := '\#ifndef __powerpc64__'
+ softfp_wrap_end := '\#endif'
+diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/t-linux64.orig gcc-4.2.0/gcc/config/rs6000/t-linux64.orig
+--- gcc-4.2.0.orig/gcc/config/rs6000/t-linux64.orig	1969-12-31 19:00:00.000000000 -0500
++++ gcc-4.2.0/gcc/config/rs6000/t-linux64.orig	2007-05-16 19:51:40.000000000 -0400
+@@ -0,0 +1,19 @@
++
++#rs6000/t-linux64
++
++LIB2FUNCS_EXTRA += tramp.S $(srcdir)/config/rs6000/ppc64-fp.c \
++	$(srcdir)/config/rs6000/darwin-ldouble.c
++LIB2FUNCS_EXTRA := $(sort $(LIB2FUNCS_EXTRA))
++
++TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc
++
++MULTILIB_OPTIONS        = m64/m32 msoft-float
++MULTILIB_DIRNAMES       = 64 32 nof
++MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
++MULTILIB_EXCEPTIONS     = m64/msoft-float
++MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
++MULTILIB_OSDIRNAMES	= ../lib64 ../lib nof
++MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
++
++softfp_wrap_start := '\#ifndef __powerpc64__'
++softfp_wrap_end := '\#endif'
Index: patches/gcc-4.2.2-pure64-1.patch
===================================================================
--- patches/gcc-4.2.2-pure64-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
+++ patches/gcc-4.2.2-pure64-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
@@ -0,0 +1,162 @@
+diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux64.h gcc-4.2.0/gcc/config/i386/linux64.h
+--- gcc-4.2.0.orig/gcc/config/i386/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/i386/linux64.h	2007-05-18 17:04:05.000000000 -0400
+@@ -49,8 +49,8 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
+ 
+ #undef	LINK_SPEC
+ #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
+diff -Naur gcc-4.2.0.orig/gcc/config/i386/t-linux64 gcc-4.2.0/gcc/config/i386/t-linux64
+--- gcc-4.2.0.orig/gcc/config/i386/t-linux64	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/i386/t-linux64	2007-05-18 17:04:36.000000000 -0400
+@@ -6,7 +6,7 @@
+ 
+ MULTILIB_OPTIONS = m64/m32
+ MULTILIB_DIRNAMES = 64 32 
+-MULTILIB_OSDIRNAMES = ../lib64 ../lib
++MULTILIB_OSDIRNAMES = ../lib ../lib32
+ 
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
+diff -Naur gcc-4.2.0.orig/gcc/config/mips/linux64.h gcc-4.2.0/gcc/config/mips/linux64.h
+--- gcc-4.2.0.orig/gcc/config/mips/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/mips/linux64.h	2007-05-18 17:04:05.000000000 -0400
+@@ -36,10 +36,10 @@
+ %{!shared: %{pthread:-lpthread} \
+   %{profile:-lc_p} %{!profile: -lc}}"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
+-#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKERN32 "/lib64/ld.so.1"
++#define UCLIBC_DYNAMIC_LINKERN32 "/lib64/ld-uClibc.so.0"
+ #define LINUX_DYNAMIC_LINKERN32 \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
+ 
+diff -Naur gcc-4.2.0.orig/gcc/config/mips/t-linux64 gcc-4.2.0/gcc/config/mips/t-linux64
+--- gcc-4.2.0.orig/gcc/config/mips/t-linux64	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/mips/t-linux64	2007-05-18 17:05:40.000000000 -0400
+@@ -1,6 +1,6 @@
+ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
+ MULTILIB_DIRNAMES = n32 32 64
+-MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
++MULTILIB_OSDIRNAMES = ../lib64 ../lib32 ../lib
+ 
+ EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
+ 
+diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/linux64.h gcc-4.2.0/gcc/config/rs6000/linux64.h
+--- gcc-4.2.0.orig/gcc/config/rs6000/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/rs6000/linux64.h	2007-05-18 17:04:05.000000000 -0400
+@@ -336,8 +336,8 @@
+ #undef	LINK_OS_DEFAULT_SPEC
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
+ #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+ #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/t-linux64 gcc-4.2.0/gcc/config/rs6000/t-linux64
+--- gcc-4.2.0.orig/gcc/config/rs6000/t-linux64	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/rs6000/t-linux64	2007-05-18 17:06:22.000000000 -0400
+@@ -12,7 +12,7 @@
+ MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
+ MULTILIB_EXCEPTIONS     = m64/msoft-float
+ MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
+-MULTILIB_OSDIRNAMES	= ../lib64 ../lib nof
++MULTILIB_OSDIRNAMES	= ../lib ../lib32 nof
+ MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
+ 
+ softfp_wrap_start := '\#ifndef __powerpc64__'
+diff -Naur gcc-4.2.0.orig/gcc/config/s390/t-linux64 gcc-4.2.0/gcc/config/s390/t-linux64
+--- gcc-4.2.0.orig/gcc/config/s390/t-linux64	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/s390/t-linux64	2007-05-18 17:07:44.000000000 -0400
+@@ -1,6 +1,6 @@
+ MULTILIB_OPTIONS = m64/m31
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64 ../lib
++MULTILIB_OSDIRNAMES = ../lib ../lib32
+ 
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
+diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux64.h gcc-4.2.0/gcc/config/sparc/linux64.h
+--- gcc-4.2.0.orig/gcc/config/sparc/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/sparc/linux64.h	2007-05-18 17:04:05.000000000 -0400
+@@ -144,8 +144,8 @@
+ 
+ /* If ELF is the default format, we should not use /lib/elf.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux.so.2"
+ #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+ #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+@@ -167,7 +167,7 @@
+   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
+   { "link_arch",	 LINK_ARCH_SPEC },
+ 
+-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
++#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib32 %{shared:-shared} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+@@ -176,7 +176,7 @@
+         %{static:-static}}} \
+ "
+ 
+-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
++#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib %{shared:-shared} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+@@ -257,7 +257,7 @@
+ #else /* !SPARC_BI_ARCH */
+ 
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
++#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib %{shared:-shared} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux.h gcc-4.2.0/gcc/config/sparc/linux.h
+--- gcc-4.2.0.orig/gcc/config/sparc/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/sparc/linux.h	2007-05-18 17:04:05.000000000 -0400
+@@ -133,7 +133,7 @@
+ 
+ 
+ #undef  LINK_SPEC
+-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
++#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib32 %{shared:-shared} \
+   %{!mno-relax:%{!r:-relax}} \
+   %{!shared: \
+     %{!ibcs: \
+diff -Naur gcc-4.2.0.orig/gcc/config/sparc/t-linux64 gcc-4.2.0/gcc/config/sparc/t-linux64
+--- gcc-4.2.0.orig/gcc/config/sparc/t-linux64	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/sparc/t-linux64	2007-05-18 17:06:53.000000000 -0400
+@@ -1,6 +1,6 @@
+ MULTILIB_OPTIONS = m64/m32
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64 ../lib
++MULTILIB_OSDIRNAMES = ../lib ../lib32
+ 
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
+@@ -10,4 +10,4 @@
+ 
+ CRTSTUFF_T_CFLAGS = `if test x$$($(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) \
+ 				 -print-multi-os-directory) \
+-			= x../lib64; then echo -mcmodel=medany; fi`
++			= x../lib; then echo -mcmodel=medany; fi`
Index: patches/gcc-4.2.2-pure64_specs-1.patch
===================================================================
--- patches/gcc-4.2.2-pure64_specs-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
+++ patches/gcc-4.2.2-pure64_specs-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
@@ -0,0 +1,388 @@
+Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
+Date: 2007-02-14
+Initial Package Version: 4.1.2
+Upstream Status: Not Sent - LFS Specific
+Origin: Idea originally developed by Ryan Oliver and Greg Schafer for
+        the Pure LFS project.
+        More architectures added by Zack Winkles.
+        Further fine tunings by Greg Schafer.
+        Rediffed against gcc 4.0.0 by Robert Connolly.
+        Rediffed against gcc 4.1.0 by Chris Staub
+        Rediffed against gcc 4.1.2 by Jim Gifford
+        Rediffed against gcc 4.2.0 by Joe Ciccone
+Description: This patch modifies the location of the dynamic linker for
+        the GCC Pass 2 build in LFS Chapter 5.
+
+diff -Naur gcc-4.2.0.orig/gcc/config/alpha/gnu.h gcc-4.2.0/gcc/config/alpha/gnu.h
+--- gcc-4.2.0.orig/gcc/config/alpha/gnu.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/alpha/gnu.h	2007-05-18 16:27:10.000000000 -0400
+@@ -11,7 +11,7 @@
+     } while (0)
+ 
+ #undef ELF_DYNAMIC_LINKER
+-#define ELF_DYNAMIC_LINKER	"/lib/ld.so"
++#define ELF_DYNAMIC_LINKER	"/tools/lib/ld.so"
+ 
+ #undef	STARTFILE_SPEC
+ #define STARTFILE_SPEC \
+diff -Naur gcc-4.2.0.orig/gcc/config/alpha/linux-elf.h gcc-4.2.0/gcc/config/alpha/linux-elf.h
+--- gcc-4.2.0.orig/gcc/config/alpha/linux-elf.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/alpha/linux-elf.h	2007-05-18 16:23:31.000000000 -0400
+@@ -28,8 +28,8 @@
+ #define SUBTARGET_EXTRA_SPECS \
+ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+ 
+-#define GLIBC_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER	"/tools/lib/ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #else
+diff -Naur gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h gcc-4.2.0/gcc/config/arm/linux-eabi.h
+--- gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/arm/linux-eabi.h	2007-05-18 16:26:45.000000000 -0400
+@@ -53,7 +53,7 @@
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+    GNU/Linux binaries on an EABI system.  */
+ #undef GLIBC_DYNAMIC_LINKER
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.3"
+ 
+ /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
+    use the GNU/Linux version, not the generic BPABI version.  */
+diff -Naur gcc-4.2.0.orig/gcc/config/arm/linux-elf.h gcc-4.2.0/gcc/config/arm/linux-elf.h
+--- gcc-4.2.0.orig/gcc/config/arm/linux-elf.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/arm/linux-elf.h	2007-05-18 16:23:31.000000000 -0400
+@@ -51,7 +51,7 @@
+ 
+ #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #define LINUX_TARGET_LINK_SPEC  "%{h*} %{version:-v} \
+    %{b} \
+diff -Naur gcc-4.2.0.orig/gcc/config/cris/linux.h gcc-4.2.0/gcc/config/cris/linux.h
+--- gcc-4.2.0.orig/gcc/config/cris/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/cris/linux.h	2007-05-18 16:30:54.000000000 -0400
+@@ -76,7 +76,7 @@
+ #undef CRIS_SUBTARGET_VERSION
+ #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ /* We need an -rpath-link to ld.so.1, and presumably to each directory
+    specified with -B.  */
+dff -Naur gcc-4.2.0.orig/gcc/config/frv/linux.h gcc-4.2.0/gcc/config/frv/linux.h
+--- gcc-4.2.0.orig/gcc/config/frv/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/frv/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -36,7 +36,7 @@
+ #define ENDFILE_SPEC \
+   "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.2.0.orig/gcc/config/i386/gnu.h gcc-4.2.0/gcc/config/i386/gnu.h
+--- gcc-4.2.0.orig/gcc/config/i386/gnu.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/i386/gnu.h	2007-05-18 16:23:31.000000000 -0400
+@@ -22,7 +22,7 @@
+   %{!shared: \
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+-      %{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
++      %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so}} \
+     %{static:-static}}"
+ 
+ #undef	STARTFILE_SPEC
+diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux64.h gcc-4.2.0/gcc/config/i386/linux64.h
+--- gcc-4.2.0.orig/gcc/config/i386/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/i386/linux64.h	2007-05-18 16:23:31.000000000 -0400
+@@ -49,8 +49,8 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld-linux-x86-64.so.2"
+ 
+ #undef	LINK_SPEC
+ #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
+diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux.h gcc-4.2.0/gcc/config/i386/linux.h
+--- gcc-4.2.0.orig/gcc/config/i386/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/i386/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -101,7 +101,7 @@
+ 
+ /* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
+ #define LINK_EMULATION "elf_i386"
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #undef  SUBTARGET_EXTRA_SPECS
+ #define SUBTARGET_EXTRA_SPECS \
+diff -Naur gcc-4.2.0.orig/gcc/config/ia64/linux.h gcc-4.2.0/gcc/config/ia64/linux.h
+--- gcc-4.2.0.orig/gcc/config/ia64/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/ia64/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -37,7 +37,7 @@
+ /* Define this for shared library support because it isn't in the main
+    linux.h file.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux-ia64.so.2"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.2.0.orig/gcc/config/linux.h gcc-4.2.0/gcc/config/linux.h
+--- gcc-4.2.0.orig/gcc/config/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -112,9 +112,9 @@
+    GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
+    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
+    supporting both 32-bit and 64-bit compilation.  */
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
+ #define LINUX_DYNAMIC_LINKER \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
+ #define LINUX_DYNAMIC_LINKER32 \
+@@ -127,3 +127,7 @@
+ #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
+ 
+ #define TARGET_POSIX_IO
++
++/* Remove /usr/include from the end of the include search path.  */
++#undef STANDARD_INCLUDE_DIR
++#define STANDARD_INCLUDE_DIR 0
+diff -Naur gcc-4.2.0.orig/gcc/config/m32r/linux.h gcc-4.2.0/gcc/config/m32r/linux.h
+--- gcc-4.2.0.orig/gcc/config/m32r/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/m32r/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -59,7 +59,7 @@
+ 
+ /* If ELF is the default format, we should not use /lib/elf.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #undef	LINK_SPEC
+ #if TARGET_LITTLE_ENDIAN
+diff -Naur gcc-4.2.0.orig/gcc/config/m68k/linux.h gcc-4.2.0/gcc/config/m68k/linux.h
+--- gcc-4.2.0.orig/gcc/config/m68k/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/m68k/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -123,7 +123,7 @@
+ 
+ /* If ELF is the default format, we should not use /lib/elf.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef	LINK_SPEC
+ #define LINK_SPEC "-m m68kelf %{shared} \
+diff -Naur gcc-4.2.0.orig/gcc/config/mips/linux64.h gcc-4.2.0/gcc/config/mips/linux64.h
+--- gcc-4.2.0.orig/gcc/config/mips/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/mips/linux64.h	2007-05-18 16:23:31.000000000 -0400
+@@ -36,10 +36,10 @@
+ %{!shared: %{pthread:-lpthread} \
+   %{profile:-lc_p} %{!profile: -lc}}"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
+-#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKERN32 "/tools/lib64/ld.so.1"
++#define UCLIBC_DYNAMIC_LINKERN32 "/tools/lib64/ld-uClibc.so.0"
+ #define LINUX_DYNAMIC_LINKERN32 \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
+ 
+diff -Naur gcc-4.2.0.orig/gcc/config/mips/linux.h gcc-4.2.0/gcc/config/mips/linux.h
+--- gcc-4.2.0.orig/gcc/config/mips/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/mips/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -104,7 +104,7 @@
+ #undef MIPS_DEFAULT_GVALUE
+ #define MIPS_DEFAULT_GVALUE 0
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ /* Borrowed from sparc/linux.h */
+ #undef LINK_SPEC
+diff -Naur gcc-4.2.0.orig/gcc/config/mn10300/linux.h gcc-4.2.0/gcc/config/mn10300/linux.h
+--- gcc-4.2.0.orig/gcc/config/mn10300/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/mn10300/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -33,7 +33,7 @@
+ #undef  ASM_SPEC
+ #define ASM_SPEC "%{Wa,*:%*}"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
+diff -Naur gcc-4.2.0.orig/gcc/config/pa/pa-linux.h gcc-4.2.0/gcc/config/pa/pa-linux.h
+--- gcc-4.2.0.orig/gcc/config/pa/pa-linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/pa/pa-linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -45,7 +45,7 @@
+ /* Define this for shared library support because it isn't in the main
+    linux.h file.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/linux64.h gcc-4.2.0/gcc/config/rs6000/linux64.h
+--- gcc-4.2.0.orig/gcc/config/rs6000/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/rs6000/linux64.h	2007-05-18 16:23:31.000000000 -0400
+@@ -336,10 +336,10 @@
+ #undef	LINK_OS_DEFAULT_SPEC
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64.so.1"
++#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #else
+diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/sysv4.h gcc-4.2.0/gcc/config/rs6000/sysv4.h
+--- gcc-4.2.0.orig/gcc/config/rs6000/sysv4.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/rs6000/sysv4.h	2007-05-18 16:29:05.000000000 -0400
+@@ -892,8 +892,8 @@
+ 
+ #define LINK_START_LINUX_SPEC ""
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #else
+@@ -935,7 +935,7 @@
+ 
+ #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+   %{rdynamic:-export-dynamic} \
+-  %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
++  %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
+ 
+ #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__	\
+ %{!undef:					                \
+diff -Naur gcc-4.2.0.orig/gcc/config/s390/linux.h gcc-4.2.0/gcc/config/s390/linux.h
+--- gcc-4.2.0.orig/gcc/config/s390/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/s390/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -73,8 +73,8 @@
+ #define MULTILIB_DEFAULTS { "m31" }
+ #endif
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64.so.1"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC \
+diff -Naur gcc-4.2.0.orig/gcc/config/sh/linux.h gcc-4.2.0/gcc/config/sh/linux.h
+--- gcc-4.2.0.orig/gcc/config/sh/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/sh/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -48,7 +48,7 @@
+ 
+ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #undef SUBTARGET_LINK_EMUL_SUFFIX
+ #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
+diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux64.h gcc-4.2.0/gcc/config/sparc/linux64.h
+--- gcc-4.2.0.orig/gcc/config/sparc/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/sparc/linux64.h	2007-05-18 16:25:23.000000000 -0400
+@@ -144,10 +144,10 @@
+ 
+ /* If ELF is the default format, we should not use /lib/elf.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #else
+@@ -167,7 +167,7 @@
+   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
+   { "link_arch",	 LINK_ARCH_SPEC },
+ 
+-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
++#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/tools/lib32 %{shared:-shared} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+@@ -176,7 +176,7 @@
+         %{static:-static}}} \
+ "
+ 
+-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
++#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/tools/lib %{shared:-shared} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+@@ -257,7 +257,7 @@
+ #else /* !SPARC_BI_ARCH */
+ 
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
++#define LINK_SPEC "-m elf64_sparc -Y P,/tools/lib %{shared:-shared} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux.h gcc-4.2.0/gcc/config/sparc/linux.h
+--- gcc-4.2.0.orig/gcc/config/sparc/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/sparc/linux.h	2007-05-18 16:24:24.000000000 -0400
+@@ -121,8 +121,8 @@
+ 
+ /* If ELF is the default format, we should not use /lib/elf.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #else
+@@ -133,7 +133,7 @@
+ 
+ 
+ #undef  LINK_SPEC
+-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
++#define LINK_SPEC "-m elf32_sparc -Y P,/tools/lib32 %{shared:-shared} \
+   %{!mno-relax:%{!r:-relax}} \
+   %{!shared: \
+     %{!ibcs: \
+diff -Naur gcc-4.2.0.orig/gcc/config/xtensa/linux.h gcc-4.2.0/gcc/config/xtensa/linux.h
+--- gcc-4.2.0.orig/gcc/config/xtensa/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/xtensa/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -43,7 +43,7 @@
+   %{mlongcalls:--longcalls} \
+   %{mno-longcalls:--no-longcalls}"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC \
Index: patches/gcc-4.2.2-specs-1.patch
===================================================================
--- patches/gcc-4.2.2-specs-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
+++ patches/gcc-4.2.2-specs-1.patch	(revision 5a90148a9652be0a02d3b17267eca50510c2df69)
@@ -0,0 +1,388 @@
+Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
+Date: 2007-02-14
+Initial Package Version: 4.1.2
+Upstream Status: Not Sent - LFS Specific
+Origin: Idea originally developed by Ryan Oliver and Greg Schafer for
+        the Pure LFS project.
+        More architectures added by Zack Winkles.
+        Further fine tunings by Greg Schafer.
+        Rediffed against gcc 4.0.0 by Robert Connolly.
+        Rediffed against gcc 4.1.0 by Chris Staub
+        Rediffed against gcc 4.1.2 by Jim Gifford
+        Rediffed against gcc 4.2.0 by Joe Ciccone
+Description: This patch modifies the location of the dynamic linker for
+        the GCC Pass 2 build in LFS Chapter 5.
+
+diff -Naur gcc-4.2.0.orig/gcc/config/alpha/gnu.h gcc-4.2.0/gcc/config/alpha/gnu.h
+--- gcc-4.2.0.orig/gcc/config/alpha/gnu.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/alpha/gnu.h	2007-05-18 16:27:10.000000000 -0400
+@@ -11,7 +11,7 @@
+     } while (0)
+ 
+ #undef ELF_DYNAMIC_LINKER
+-#define ELF_DYNAMIC_LINKER	"/lib/ld.so"
++#define ELF_DYNAMIC_LINKER	"/tools/lib/ld.so"
+ 
+ #undef	STARTFILE_SPEC
+ #define STARTFILE_SPEC \
+diff -Naur gcc-4.2.0.orig/gcc/config/alpha/linux-elf.h gcc-4.2.0/gcc/config/alpha/linux-elf.h
+--- gcc-4.2.0.orig/gcc/config/alpha/linux-elf.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/alpha/linux-elf.h	2007-05-18 16:23:31.000000000 -0400
+@@ -28,8 +28,8 @@
+ #define SUBTARGET_EXTRA_SPECS \
+ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+ 
+-#define GLIBC_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER	"/tools/lib/ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #else
+diff -Naur gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h gcc-4.2.0/gcc/config/arm/linux-eabi.h
+--- gcc-4.2.0.orig/gcc/config/arm/linux-eabi.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/arm/linux-eabi.h	2007-05-18 16:26:45.000000000 -0400
+@@ -53,7 +53,7 @@
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+    GNU/Linux binaries on an EABI system.  */
+ #undef GLIBC_DYNAMIC_LINKER
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.3"
+ 
+ /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
+    use the GNU/Linux version, not the generic BPABI version.  */
+diff -Naur gcc-4.2.0.orig/gcc/config/arm/linux-elf.h gcc-4.2.0/gcc/config/arm/linux-elf.h
+--- gcc-4.2.0.orig/gcc/config/arm/linux-elf.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/arm/linux-elf.h	2007-05-18 16:23:31.000000000 -0400
+@@ -51,7 +51,7 @@
+ 
+ #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #define LINUX_TARGET_LINK_SPEC  "%{h*} %{version:-v} \
+    %{b} \
+diff -Naur gcc-4.2.0.orig/gcc/config/cris/linux.h gcc-4.2.0/gcc/config/cris/linux.h
+--- gcc-4.2.0.orig/gcc/config/cris/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/cris/linux.h	2007-05-18 16:30:54.000000000 -0400
+@@ -76,7 +76,7 @@
+ #undef CRIS_SUBTARGET_VERSION
+ #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ /* We need an -rpath-link to ld.so.1, and presumably to each directory
+    specified with -B.  */
+diff -Naur gcc-4.2.0.orig/gcc/config/frv/linux.h gcc-4.2.0/gcc/config/frv/linux.h
+--- gcc-4.2.0.orig/gcc/config/frv/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/frv/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -36,7 +36,7 @@
+ #define ENDFILE_SPEC \
+   "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.2.0.orig/gcc/config/i386/gnu.h gcc-4.2.0/gcc/config/i386/gnu.h
+--- gcc-4.2.0.orig/gcc/config/i386/gnu.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/i386/gnu.h	2007-05-18 16:23:31.000000000 -0400
+@@ -22,7 +22,7 @@
+   %{!shared: \
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+-      %{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
++      %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so}} \
+     %{static:-static}}"
+ 
+ #undef	STARTFILE_SPEC
+diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux64.h gcc-4.2.0/gcc/config/i386/linux64.h
+--- gcc-4.2.0.orig/gcc/config/i386/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/i386/linux64.h	2007-05-18 16:23:31.000000000 -0400
+@@ -49,8 +49,8 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld-linux-x86-64.so.2"
+ 
+ #undef	LINK_SPEC
+ #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
+diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux.h gcc-4.2.0/gcc/config/i386/linux.h
+--- gcc-4.2.0.orig/gcc/config/i386/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/i386/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -101,7 +101,7 @@
+ 
+ /* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
+ #define LINK_EMULATION "elf_i386"
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #undef  SUBTARGET_EXTRA_SPECS
+ #define SUBTARGET_EXTRA_SPECS \
+diff -Naur gcc-4.2.0.orig/gcc/config/ia64/linux.h gcc-4.2.0/gcc/config/ia64/linux.h
+--- gcc-4.2.0.orig/gcc/config/ia64/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/ia64/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -37,7 +37,7 @@
+ /* Define this for shared library support because it isn't in the main
+    linux.h file.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux-ia64.so.2"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.2.0.orig/gcc/config/linux.h gcc-4.2.0/gcc/config/linux.h
+--- gcc-4.2.0.orig/gcc/config/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -112,9 +112,9 @@
+    GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
+    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
+    supporting both 32-bit and 64-bit compilation.  */
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
+ #define LINUX_DYNAMIC_LINKER \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
+ #define LINUX_DYNAMIC_LINKER32 \
+@@ -127,3 +127,7 @@
+ #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
+ 
+ #define TARGET_POSIX_IO
++
++/* Remove /usr/include from the end of the include search path.  */
++#undef STANDARD_INCLUDE_DIR
++#define STANDARD_INCLUDE_DIR 0
+diff -Naur gcc-4.2.0.orig/gcc/config/m32r/linux.h gcc-4.2.0/gcc/config/m32r/linux.h
+--- gcc-4.2.0.orig/gcc/config/m32r/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/m32r/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -59,7 +59,7 @@
+ 
+ /* If ELF is the default format, we should not use /lib/elf.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #undef	LINK_SPEC
+ #if TARGET_LITTLE_ENDIAN
+diff -Naur gcc-4.2.0.orig/gcc/config/m68k/linux.h gcc-4.2.0/gcc/config/m68k/linux.h
+--- gcc-4.2.0.orig/gcc/config/m68k/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/m68k/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -123,7 +123,7 @@
+ 
+ /* If ELF is the default format, we should not use /lib/elf.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef	LINK_SPEC
+ #define LINK_SPEC "-m m68kelf %{shared} \
+diff -Naur gcc-4.2.0.orig/gcc/config/mips/linux64.h gcc-4.2.0/gcc/config/mips/linux64.h
+--- gcc-4.2.0.orig/gcc/config/mips/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/mips/linux64.h	2007-05-18 16:23:31.000000000 -0400
+@@ -36,10 +36,10 @@
+ %{!shared: %{pthread:-lpthread} \
+   %{profile:-lc_p} %{!profile: -lc}}"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
+-#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld.so.1"
++#define GLIBC_DYNAMIC_LINKERN32 "/tools/lib32/ld.so.1"
++#define UCLIBC_DYNAMIC_LINKERN32 "/tools/lib32/ld-uClibc.so.0"
+ #define LINUX_DYNAMIC_LINKERN32 \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
+ 
+diff -Naur gcc-4.2.0.orig/gcc/config/mips/linux.h gcc-4.2.0/gcc/config/mips/linux.h
+--- gcc-4.2.0.orig/gcc/config/mips/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/mips/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -104,7 +104,7 @@
+ #undef MIPS_DEFAULT_GVALUE
+ #define MIPS_DEFAULT_GVALUE 0
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ /* Borrowed from sparc/linux.h */
+ #undef LINK_SPEC
+diff -Naur gcc-4.2.0.orig/gcc/config/mn10300/linux.h gcc-4.2.0/gcc/config/mn10300/linux.h
+--- gcc-4.2.0.orig/gcc/config/mn10300/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/mn10300/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -33,7 +33,7 @@
+ #undef  ASM_SPEC
+ #define ASM_SPEC "%{Wa,*:%*}"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
+diff -Naur gcc-4.2.0.orig/gcc/config/pa/pa-linux.h gcc-4.2.0/gcc/config/pa/pa-linux.h
+--- gcc-4.2.0.orig/gcc/config/pa/pa-linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/pa/pa-linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -45,7 +45,7 @@
+ /* Define this for shared library support because it isn't in the main
+    linux.h file.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/linux64.h gcc-4.2.0/gcc/config/rs6000/linux64.h
+--- gcc-4.2.0.orig/gcc/config/rs6000/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/rs6000/linux64.h	2007-05-18 16:23:31.000000000 -0400
+@@ -336,10 +336,10 @@
+ #undef	LINK_OS_DEFAULT_SPEC
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld64.so.1"
++#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #else
+diff -Naur gcc-4.2.0.orig/gcc/config/rs6000/sysv4.h gcc-4.2.0/gcc/config/rs6000/sysv4.h
+--- gcc-4.2.0.orig/gcc/config/rs6000/sysv4.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/rs6000/sysv4.h	2007-05-18 16:29:05.000000000 -0400
+@@ -892,8 +892,8 @@
+ 
+ #define LINK_START_LINUX_SPEC ""
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #else
+@@ -935,7 +935,7 @@
+ 
+ #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+   %{rdynamic:-export-dynamic} \
+-  %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
++  %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
+ 
+ #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__	\
+ %{!undef:					                \
+diff -Naur gcc-4.2.0.orig/gcc/config/s390/linux.h gcc-4.2.0/gcc/config/s390/linux.h
+--- gcc-4.2.0.orig/gcc/config/s390/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/s390/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -73,8 +73,8 @@
+ #define MULTILIB_DEFAULTS { "m31" }
+ #endif
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64.so.1"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC \
+diff -Naur gcc-4.2.0.orig/gcc/config/sh/linux.h gcc-4.2.0/gcc/config/sh/linux.h
+--- gcc-4.2.0.orig/gcc/config/sh/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/sh/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -48,7 +48,7 @@
+ 
+ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #undef SUBTARGET_LINK_EMUL_SUFFIX
+ #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
+diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux64.h gcc-4.2.0/gcc/config/sparc/linux64.h
+--- gcc-4.2.0.orig/gcc/config/sparc/linux64.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/sparc/linux64.h	2007-05-18 16:25:23.000000000 -0400
+@@ -144,10 +144,10 @@
+ 
+ /* If ELF is the default format, we should not use /lib/elf.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #else
+@@ -167,7 +167,7 @@
+   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
+   { "link_arch",	 LINK_ARCH_SPEC },
+ 
+-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
++#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/tools/lib %{shared:-shared} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+@@ -176,7 +176,7 @@
+         %{static:-static}}} \
+ "
+ 
+-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
++#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/tools/lib64 %{shared:-shared} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+@@ -257,7 +257,7 @@
+ #else /* !SPARC_BI_ARCH */
+ 
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
++#define LINK_SPEC "-m elf64_sparc -Y P,/tools/lib64 %{shared:-shared} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+diff -Naur gcc-4.2.0.orig/gcc/config/sparc/linux.h gcc-4.2.0/gcc/config/sparc/linux.h
+--- gcc-4.2.0.orig/gcc/config/sparc/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/sparc/linux.h	2007-05-18 16:24:24.000000000 -0400
+@@ -121,8 +121,8 @@
+ 
+ /* If ELF is the default format, we should not use /lib/elf.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
+ #if UCLIBC_DEFAULT
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #else
+@@ -133,7 +133,7 @@
+ 
+ 
+ #undef  LINK_SPEC
+-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
++#define LINK_SPEC "-m elf32_sparc -Y P,/tools/lib %{shared:-shared} \
+   %{!mno-relax:%{!r:-relax}} \
+   %{!shared: \
+     %{!ibcs: \
+diff -Naur gcc-4.2.0.orig/gcc/config/xtensa/linux.h gcc-4.2.0/gcc/config/xtensa/linux.h
+--- gcc-4.2.0.orig/gcc/config/xtensa/linux.h	2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/xtensa/linux.h	2007-05-18 16:23:31.000000000 -0400
+@@ -43,7 +43,7 @@
+   %{mlongcalls:--longcalls} \
+   %{mno-longcalls:--no-longcalls}"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC \
