Submitted By: Martin Ward Date: 06-02-2013 Initial Package Version: 4.8.1 Origin: Idea originally developed by Ryan Oliver and Greg Schafer for the Pure LFS project. Upstream Status: Not Applied - CLFS Specific Description: This patch makes changes to the paths for pure64, eg 64bit libs in /usr/lib, 32bit in /usr/lib32. diff -Naur gcc-4.8.0.orig/gcc/config/i386/linux64.h gcc-4.8.0/gcc/config/i386/linux64.h --- gcc-4.8.0.orig/gcc/config/i386/linux64.h 2013-04-01 19:05:48.427604661 +0000 +++ gcc-4.8.0/gcc/config/i386/linux64.h 2013-04-01 19:06:29.254091403 +0000 @@ -27,6 +27,6 @@ #define GNU_USER_LINK_EMULATION64 "elf_x86_64" #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" -#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" #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" diff -Naur gcc-4.8.0.orig/gcc/config/i386/t-linux64 gcc-4.8.0/gcc/config/i386/t-linux64 --- gcc-4.8.0.orig/gcc/config/i386/t-linux64 2013-04-01 19:05:48.427604661 +0000 +++ gcc-4.8.0/gcc/config/i386/t-linux64 2013-04-01 19:11:13.271520820 +0000 @@ -33,6 +33,6 @@ comma=, MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) -MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) -MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) +MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu) +MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:i386-linux-gnu) MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) diff -Naur gcc-4.8.0.orig/gcc/config/linux.h gcc-4.8.0/gcc/config/linux.h --- gcc-4.8.0.orig/gcc/config/linux.h 2013-04-01 19:05:48.418604774 +0000 +++ gcc-4.8.0/gcc/config/linux.h 2013-04-01 19:06:29.255091390 +0000 @@ -74,7 +74,7 @@ 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_LINKER32 "/lib32/ld-uClibc.so.0" #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" #define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" diff -Naur gcc-4.8.0.orig/gcc/config/mips/linux64.h gcc-4.8.0/gcc/config/mips/linux64.h --- gcc-4.8.0.orig/gcc/config/mips/linux64.h 2013-04-01 19:05:48.439604510 +0000 +++ gcc-4.8.0/gcc/config/mips/linux64.h 2013-04-01 19:06:29.255091390 +0000 @@ -22,10 +22,10 @@ #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip" #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" -#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 BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" #define GNU_USER_DYNAMIC_LINKERN32 \ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ diff -Naur gcc-4.8.0.orig/gcc/config/mips/t-linux64 gcc-4.8.0/gcc/config/mips/t-linux64 --- gcc-4.8.0.orig/gcc/config/mips/t-linux64 2013-04-01 19:05:48.439604510 +0000 +++ gcc-4.8.0/gcc/config/mips/t-linux64 2013-04-01 19:13:06.343099318 +0000 @@ -22,5 +22,5 @@ MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) MULTILIB_OSDIRNAMES = \ ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ - ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ - ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) + ../lib32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ + ../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) diff -Naur gcc-4.8.0.orig/gcc/config/rs6000/linux64.h gcc-4.8.0/gcc/config/rs6000/linux64.h --- gcc-4.8.0.orig/gcc/config/rs6000/linux64.h 2013-04-01 19:05:48.393605089 +0000 +++ gcc-4.8.0/gcc/config/rs6000/linux64.h 2013-04-01 19:06:29.257091365 +0000 @@ -360,9 +360,9 @@ #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 GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1" +#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" +#define UCLIBC_DYNAMIC_LINKER32 "/lib32/ld-uClibc.so.0" #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" #if DEFAULT_LIBC == LIBC_UCLIBC #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" diff -Naur gcc-4.8.0.orig/gcc/config/rs6000/t-linux64 gcc-4.8.0/gcc/config/rs6000/t-linux64 --- gcc-4.8.0.orig/gcc/config/rs6000/t-linux64 2013-04-01 19:05:48.393605089 +0000 +++ gcc-4.8.0/gcc/config/rs6000/t-linux64 2013-04-01 19:15:00.079669456 +0000 @@ -28,5 +28,5 @@ MULTILIB_OPTIONS = m64/m32 MULTILIB_DIRNAMES = 64 32 MULTILIB_EXTRA_OPTS = fPIC -MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:powerpc64-linux-gnu) -MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) +MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:powerpc64-linux-gnu) +MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:powerpc-linux-gnu) diff -Naur gcc-4.8.0.orig/gcc/config/s390/linux.h gcc-4.8.0/gcc/config/s390/linux.h --- gcc-4.8.0.orig/gcc/config/s390/linux.h 2013-04-01 19:05:48.455604309 +0000 +++ gcc-4.8.0/gcc/config/s390/linux.h 2013-04-01 19:06:29.258091353 +0000 @@ -60,7 +60,7 @@ #define MULTILIB_DEFAULTS { "m31" } #endif -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" +#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1" #define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" #undef LINK_SPEC diff -Naur gcc-4.8.0.orig/gcc/config/s390/t-linux64 gcc-4.8.0/gcc/config/s390/t-linux64 --- gcc-4.8.0.orig/gcc/config/s390/t-linux64 2013-04-01 19:05:48.455604309 +0000 +++ gcc-4.8.0/gcc/config/s390/t-linux64 2013-04-01 19:16:00.351911731 +0000 @@ -7,5 +7,5 @@ MULTILIB_OPTIONS = m64/m31 MULTILIB_DIRNAMES = 64 32 -MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu) -MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu) +MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:s390x-linux-gnu) +MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:s390-linux-gnu) diff -Naur gcc-4.8.0.orig/gcc/config/sparc/linux.h gcc-4.8.0/gcc/config/sparc/linux.h --- gcc-4.8.0.orig/gcc/config/sparc/linux.h 2013-04-01 19:05:48.447604410 +0000 +++ gcc-4.8.0/gcc/config/sparc/linux.h 2013-04-01 19:20:41.967371345 +0000 @@ -83,7 +83,7 @@ When the -shared link option is used a final link is not being done. */ -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#define GLIBC_DYNAMIC_LINKER "/lib32/ld-linux.so.2" #undef LINK_SPEC #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ diff -Naur gcc-4.8.0.orig/gcc/config/sparc/linux64.h gcc-4.8.0/gcc/config/sparc/linux64.h --- gcc-4.8.0.orig/gcc/config/sparc/linux64.h 2013-04-01 19:05:48.447604410 +0000 +++ gcc-4.8.0/gcc/config/sparc/linux64.h 2013-04-01 19:06:29.260091327 +0000 @@ -92,8 +92,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.so.2" +#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2" +#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux.so.2" #ifdef SPARC_BI_ARCH @@ -201,7 +201,7 @@ #else /* !SPARC_BI_ARCH */ #undef LINK_SPEC -#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ +#define LINK_SPEC "-m elf64_sparc -Y P,%R/lib %{shared:-shared} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ diff -Naur gcc-4.8.0.orig/gcc/config/sparc/t-linux64 gcc-4.8.0/gcc/config/sparc/t-linux64 --- gcc-4.8.0.orig/gcc/config/sparc/t-linux64 2013-04-01 19:05:48.447604410 +0000 +++ gcc-4.8.0/gcc/config/sparc/t-linux64 2013-04-01 19:23:56.719922974 +0000 @@ -25,5 +25,5 @@ MULTILIB_OPTIONS = m64/m32 MULTILIB_DIRNAMES = 64 32 -MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:sparc64-linux-gnu) -MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:sparc-linux-gnu) +MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:sparc64-linux-gnu) +MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:sparc-linux-gnu)