Submitted By: William Harrington Date: 05-13-2017 Initial Package Version: 6.1.0 Origin: Idea originally developed by Ryan Oliver and Greg Schafer for the Pure LFS project with help from Martin Ward and Chris Staub 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. Comment: Rediffed for 7.1.0 diff -Naur gcc-7.1.0.orig/gcc/config/i386/linux64.h gcc-7.1.0/gcc/config/i386/linux64.h --- gcc-7.1.0.orig/gcc/config/i386/linux64.h 2017-01-01 12:07:43.000000000 +0000 +++ gcc-7.1.0/gcc/config/i386/linux64.h 2017-05-14 03:33:00.632243461 +0000 @@ -27,8 +27,8 @@ #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" #undef MUSL_DYNAMIC_LINKER32 diff -Naur gcc-7.1.0.orig/gcc/config/i386/t-linux64 gcc-7.1.0/gcc/config/i386/t-linux64 --- gcc-7.1.0.orig/gcc/config/i386/t-linux64 2017-01-01 12:07:43.000000000 +0000 +++ gcc-7.1.0/gcc/config/i386/t-linux64 2017-05-14 03:33:00.632243461 +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-7.1.0.orig/gcc/config/linux.h gcc-7.1.0/gcc/config/linux.h --- gcc-7.1.0.orig/gcc/config/linux.h 2017-01-01 12:07:43.000000000 +0000 +++ gcc-7.1.0/gcc/config/linux.h 2017-05-14 03:33:00.632243461 +0000 @@ -82,7 +82,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-7.1.0.orig/gcc/config/mips/t-linux64 gcc-7.1.0/gcc/config/mips/t-linux64 --- gcc-7.1.0.orig/gcc/config/mips/t-linux64 2017-01-01 12:07:43.000000000 +0000 +++ gcc-7.1.0/gcc/config/mips/t-linux64 2017-05-14 03:33:00.632243461 +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-7.1.0.orig/gcc/config/rs6000/linux64.h gcc-7.1.0/gcc/config/rs6000/linux64.h --- gcc-7.1.0.orig/gcc/config/rs6000/linux64.h 2017-02-07 11:29:06.000000000 +0000 +++ gcc-7.1.0/gcc/config/rs6000/linux64.h 2017-05-14 03:33:00.632243461 +0000 @@ -412,16 +412,16 @@ #undef LINK_OS_DEFAULT_SPEC #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" -#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1" +#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1" #ifdef LINUX64_DEFAULT_ABI_ELFv2 #define GLIBC_DYNAMIC_LINKER64 \ -"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \ -":%(dynamic_linker_prefix)/lib64/ld64.so.2}" +"%{mabi=elfv1:/lib/ld64.so.1;" \ +":/lib/ld64.so.2}" #else #define GLIBC_DYNAMIC_LINKER64 \ -"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \ -":%(dynamic_linker_prefix)/lib64/ld64.so.1}" +"%{mabi=elfv2:/lib/ld64.so.2;" \ +":/lib/ld64.so.1}" #endif #define MUSL_DYNAMIC_LINKER32 \ @@ -429,7 +429,7 @@ #define MUSL_DYNAMIC_LINKER64 \ "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" -#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, M) \ diff -Naur gcc-7.1.0.orig/gcc/config/rs6000/t-linux64 gcc-7.1.0/gcc/config/rs6000/t-linux64 --- gcc-7.1.0.orig/gcc/config/rs6000/t-linux64 2017-01-01 12:07:43.000000000 +0000 +++ gcc-7.1.0/gcc/config/rs6000/t-linux64 2017-05-14 03:33:00.633243476 +0000 @@ -28,8 +28,8 @@ 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) rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c $(COMPILE) $< diff -Naur gcc-7.1.0.orig/gcc/config/s390/linux.h gcc-7.1.0/gcc/config/s390/linux.h --- gcc-7.1.0.orig/gcc/config/s390/linux.h 2017-02-06 10:25:05.000000000 +0000 +++ gcc-7.1.0/gcc/config/s390/linux.h 2017-05-14 03:33:00.633243476 +0000 @@ -73,7 +73,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-7.1.0.orig/gcc/config/s390/t-linux64 gcc-7.1.0/gcc/config/s390/t-linux64 --- gcc-7.1.0.orig/gcc/config/s390/t-linux64 2012-11-21 16:13:28.000000000 +0000 +++ gcc-7.1.0/gcc/config/s390/t-linux64 2017-05-14 03:33:00.633243476 +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-7.1.0.orig/gcc/config/sparc/linux.h gcc-7.1.0/gcc/config/sparc/linux.h --- gcc-7.1.0.orig/gcc/config/sparc/linux.h 2017-01-01 12:07:43.000000000 +0000 +++ gcc-7.1.0/gcc/config/sparc/linux.h 2017-05-14 03:33:00.633243476 +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-7.1.0.orig/gcc/config/sparc/linux64.h gcc-7.1.0/gcc/config/sparc/linux64.h --- gcc-7.1.0.orig/gcc/config/sparc/linux64.h 2017-01-01 12:07:43.000000000 +0000 +++ gcc-7.1.0/gcc/config/sparc/linux64.h 2017-05-14 03:33:00.634243490 +0000 @@ -84,8 +84,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 @@ -213,7 +213,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-7.1.0.orig/gcc/config/sparc/t-linux64 gcc-7.1.0/gcc/config/sparc/t-linux64 --- gcc-7.1.0.orig/gcc/config/sparc/t-linux64 2017-01-01 12:07:43.000000000 +0000 +++ gcc-7.1.0/gcc/config/sparc/t-linux64 2017-05-14 03:33:00.634243490 +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)