Submitted By: Jim Gifford (patches at jg555 dot com)
Date: 2006-04-21
Initial Package Version: 3.4.6
Origin: Ken Moffat and Jim Gifford
Upstream Status: LFS Specific
Description: Make LIB64 builds in /lib instead of /lib64
 
Rediffed for 3.4.6 by Jim Gifford

diff -Naur gcc-3.4.6.orig/gcc/config/i386/linux64.h gcc-3.4.6/gcc/config/i386/linux64.h
--- gcc-3.4.6.orig/gcc/config/i386/linux64.h	2003-11-28 19:08:13.000000000 -0800
+++ gcc-3.4.6/gcc/config/i386/linux64.h	2006-04-21 12:07:29.000000000 -0700
@@ -60,8 +60,8 @@
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
-      %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
+      %{m32:%{!dynamic-linker:-dynamic-linker /lib32/ld-linux.so.2}} \
+      %{!m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux-x86-64.so.2}}} \
     %{static:-static}}"
 
 #define MULTILIB_DEFAULTS { "m64" }
diff -Naur gcc-3.4.6.orig/gcc/config/i386/t-linux64 gcc-3.4.6/gcc/config/i386/t-linux64
--- gcc-3.4.6.orig/gcc/config/i386/t-linux64	2002-11-28 06:47:02.000000000 -0800
+++ gcc-3.4.6/gcc/config/i386/t-linux64	2006-04-21 12:07:29.000000000 -0700
@@ -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-3.4.6.orig/gcc/config/mips/linux64.h gcc-3.4.6/gcc/config/mips/linux64.h
--- gcc-3.4.6.orig/gcc/config/mips/linux64.h	2004-06-15 18:42:25.000000000 -0700
+++ gcc-3.4.6/gcc/config/mips/linux64.h	2006-04-21 12:07:29.000000000 -0700
@@ -65,9 +65,9 @@
       %{!static: \
         %{rdynamic:-export-dynamic} \
         %{!dynamic-linker: \
-	  %{mabi=n32: -dynamic-linker /lib32/ld.so.1} \
-	  %{mabi=64: -dynamic-linker /lib64/ld.so.1} \
-	  %{mabi=32: -dynamic-linker /lib/ld.so.1}}} \
+	  %{mabi=n32: -dynamic-linker /lib64/ld.so.1} \
+	  %{mabi=64: -dynamic-linker /lib/ld.so.1} \
+	  %{mabi=32: -dynamic-linker /lib32/ld.so.1}}} \
       %{static:-static}}} \
 %{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \
 %{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \
diff -Naur gcc-3.4.6.orig/gcc/config/mips/t-linux64 gcc-3.4.6/gcc/config/mips/t-linux64
--- gcc-3.4.6.orig/gcc/config/mips/t-linux64	2003-06-03 22:35:15.000000000 -0700
+++ gcc-3.4.6/gcc/config/mips/t-linux64	2006-04-21 12:07:29.000000000 -0700
@@ -1,6 +1,6 @@
 MULTILIB_OPTIONS = mabi=32/mabi=n32/mabi=64
 MULTILIB_DIRNAMES = o32 32 64
-MULTILIB_OSDIRNAMES = ../lib ../lib32 ../lib64
+MULTILIB_OSDIRNAMES = ../lib32 ../lib64 ../lib
 
 EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
 
diff -Naur gcc-3.4.6.orig/gcc/config/rs6000/linux64.h gcc-3.4.6/gcc/config/rs6000/linux64.h
--- gcc-3.4.6.orig/gcc/config/rs6000/linux64.h	2005-12-12 18:45:31.000000000 -0800
+++ gcc-3.4.6/gcc/config/rs6000/linux64.h	2006-04-21 12:07:29.000000000 -0700
@@ -357,11 +357,11 @@
 
 #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
   %{rdynamic:-export-dynamic} \
-  %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+  %{!dynamic-linker:-dynamic-linker /lib32/ld.so.1}}}"
 
 #define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
   %{rdynamic:-export-dynamic} \
-  %{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}"
+  %{!dynamic-linker:-dynamic-linker /lib/ld64.so.1}}}"
 
 #undef  TOC_SECTION_ASM_OP
 #define TOC_SECTION_ASM_OP \
diff -Naur gcc-3.4.6.orig/gcc/config/rs6000/t-linux64 gcc-3.4.6/gcc/config/rs6000/t-linux64
--- gcc-3.4.6.orig/gcc/config/rs6000/t-linux64	2005-02-24 01:26:59.000000000 -0800
+++ gcc-3.4.6/gcc/config/rs6000/t-linux64	2006-04-21 12:07:29.000000000 -0700
@@ -14,7 +14,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)
 
 # We want fine grained libraries, so use the new code to build the
diff -Naur gcc-3.4.6.orig/gcc/config/sparc/linux64.h gcc-3.4.6/gcc/config/sparc/linux64.h
--- gcc-3.4.6.orig/gcc/config/sparc/linux64.h	2004-06-05 20:55:17.000000000 -0700
+++ gcc-3.4.6/gcc/config/sparc/linux64.h	2006-04-21 12:07:29.000000000 -0700
@@ -167,21 +167,21 @@
   { "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: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+        %{!dynamic-linker:-dynamic-linker /lib32/ld-linux.so.2}} \
         %{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: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
+        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
         %{static:-static}}} \
 "
 
@@ -257,12 +257,12 @@
 #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: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
+        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
         %{static:-static}}} \
 %{mlittle-endian:-EL} \
 %{!mno-relax:%{!r:-relax}} \
diff -Naur gcc-3.4.6.orig/gcc/config/sparc/t-linux64 gcc-3.4.6/gcc/config/sparc/t-linux64
--- gcc-3.4.6.orig/gcc/config/sparc/t-linux64	2004-04-01 08:13:09.000000000 -0800
+++ gcc-3.4.6/gcc/config/sparc/t-linux64	2006-04-21 12:07:29.000000000 -0700
@@ -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
