Submitted By: William Harrington Date: 05-31-2014 Initial Package Version: 4.8.3 Origin: Idea originally developed by Ryan Oliver and Greg Schafer for the Pure LFS project with help from Martin Ward 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.3.orig/gcc/config/i386/linux64.h gcc-4.8.3/gcc/config/i386/linux64.h --- gcc-4.8.3.orig/gcc/config/i386/linux64.h 2013-01-10 20:38:27.000000000 +0000 +++ gcc-4.8.3/gcc/config/i386/linux64.h 2014-06-01 05:03:44.355344528 +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.3.orig/gcc/config/i386/t-linux64 gcc-4.8.3/gcc/config/i386/t-linux64 --- gcc-4.8.3.orig/gcc/config/i386/t-linux64 2013-01-10 20:38:27.000000000 +0000 +++ gcc-4.8.3/gcc/config/i386/t-linux64 2014-06-01 05:03:44.355344528 +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.3.orig/gcc/config/linux.h gcc-4.8.3/gcc/config/linux.h --- gcc-4.8.3.orig/gcc/config/linux.h 2013-01-10 20:38:27.000000000 +0000 +++ gcc-4.8.3/gcc/config/linux.h 2014-06-01 05:03:44.355344528 +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.3.orig/gcc/config/mips/linux64.h gcc-4.8.3/gcc/config/mips/linux64.h --- gcc-4.8.3.orig/gcc/config/mips/linux64.h 2013-01-10 20:38:27.000000000 +0000 +++ gcc-4.8.3/gcc/config/mips/linux64.h 2014-06-01 05:03:44.355344528 +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.3.orig/gcc/config/mips/t-linux64 gcc-4.8.3/gcc/config/mips/t-linux64 --- gcc-4.8.3.orig/gcc/config/mips/t-linux64 2013-01-10 20:38:27.000000000 +0000 +++ gcc-4.8.3/gcc/config/mips/t-linux64 2014-06-01 05:03:44.355344528 +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.3.orig/gcc/config/rs6000/linux64.h gcc-4.8.3/gcc/config/rs6000/linux64.h --- gcc-4.8.3.orig/gcc/config/rs6000/linux64.h 2014-04-04 15:10:24.000000000 +0000 +++ gcc-4.8.3/gcc/config/rs6000/linux64.h 2014-06-01 05:05:00.847317093 +0000 @@ -366,13 +366,13 @@ #undef LINK_OS_DEFAULT_SPEC #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" +#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1" #ifdef LINUX64_DEFAULT_ABI_ELFv2 -#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}" +#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib/ld64.so.1;:/lib/ld64.so.2}" #else -#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}" +#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib/ld64.so.2;:/lib/ld64.so.1}" #endif -#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" #if DEFAULT_LIBC == LIBC_UCLIBC #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" diff -Naur gcc-4.8.3.orig/gcc/config/rs6000/t-linux64 gcc-4.8.3/gcc/config/rs6000/t-linux64 --- gcc-4.8.3.orig/gcc/config/rs6000/t-linux64 2014-04-04 14:39:26.000000000 +0000 +++ gcc-4.8.3/gcc/config/rs6000/t-linux64 2014-06-01 05:06:00.752194628 +0000 @@ -28,5 +28,5 @@ MULTILIB_OPTIONS := m64/m32 MULTILIB_DIRNAMES := 64 32 MULTILIB_EXTRA_OPTS := -MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) -MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) +MULTILIB_OSDIRNAMES := m64=../lib$(call if_multiarch,:powerpc64-linux-gnu) +MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:powerpc-linux-gnu) diff -Naur gcc-4.8.3.orig/gcc/config/s390/linux.h gcc-4.8.3/gcc/config/s390/linux.h --- gcc-4.8.3.orig/gcc/config/s390/linux.h 2013-01-10 20:38:27.000000000 +0000 +++ gcc-4.8.3/gcc/config/s390/linux.h 2014-06-01 05:03:44.355344528 +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.3.orig/gcc/config/s390/t-linux64 gcc-4.8.3/gcc/config/s390/t-linux64 --- gcc-4.8.3.orig/gcc/config/s390/t-linux64 2012-11-21 16:13:28.000000000 +0000 +++ gcc-4.8.3/gcc/config/s390/t-linux64 2014-06-01 05:03:44.355344528 +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.3.orig/gcc/config/sparc/linux.h gcc-4.8.3/gcc/config/sparc/linux.h --- gcc-4.8.3.orig/gcc/config/sparc/linux.h 2013-01-10 20:38:27.000000000 +0000 +++ gcc-4.8.3/gcc/config/sparc/linux.h 2014-06-01 05:03:44.355344528 +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.3.orig/gcc/config/sparc/linux64.h gcc-4.8.3/gcc/config/sparc/linux64.h --- gcc-4.8.3.orig/gcc/config/sparc/linux64.h 2013-01-10 20:38:27.000000000 +0000 +++ gcc-4.8.3/gcc/config/sparc/linux64.h 2014-06-01 05:03:44.355344528 +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.3.orig/gcc/config/sparc/t-linux64 gcc-4.8.3/gcc/config/sparc/t-linux64 --- gcc-4.8.3.orig/gcc/config/sparc/t-linux64 2013-01-10 20:38:27.000000000 +0000 +++ gcc-4.8.3/gcc/config/sparc/t-linux64 2014-06-01 05:03:44.358677723 +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)