Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] gcc: fix dynamic linker paths and default os library paths
@ 2020-12-19  5:01 q66
  2020-12-19  5:15 ` q66
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: q66 @ 2020-12-19  5:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

There is a new pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages gcc-path-fixup
https://github.com/void-linux/void-packages/pull/27269

gcc: fix dynamic linker paths and default os library paths
Void used to mess with the dynamic linker paths, which is very wrong, so it's time to change that. The reason this was done was
because the lib32/64 symlinks were not available in unconfigured chroots (since base-files used to create them during configuration) and this has not been the case for a while, so there is nothing blocking this.

While at it, change the library paths to lib64 for 64-bit systems and lib32 for 32-bit systems. This merely changes the toolchain
and usually does not have much of an effect; dynamic libraries do not contain the paths (the search paths are controlled by
the dynamic linker). The lib32/64 symlinks are contained in base-files, so there is no harm in having this be consistent.

@leahneukirchen 
@void-linux/pkg-committers

A patch file from https://github.com/void-linux/void-packages/pull/27269.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gcc-path-fixup-27269.patch --]
[-- Type: text/x-diff, Size: 16205 bytes --]

From 26d0ecc07b1e2e763acad9302b5ec17280ecb3a4 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 19 Dec 2020 05:56:11 +0100
Subject: [PATCH] gcc: fix dynamic linker paths and default os library paths

Void used to mess with the dynamic linker paths, which is very
wrong, so it's time to change that. The reason this was done was
because the lib32/64 symlinks were not available in unconfigured
chroots (since base-files used to create them during configuration)
and this has not been the case for a while, so there is nothing
blocking this.

While at it, change the library paths to lib64 for 64-bit systems
and lib32 for 32-bit systems. This merely changes the toolchain
and usually does not have much of an effect; dynamic libraries
do not contain the paths (the search paths are controlled by
the dynamic linker). The lib32/64 symlinks are contained in
base-files, so there is no harm in having this be consistent.
---
 .../patches/consistent-library-paths.patch    | 110 +++++++++
 .../gcc/patches/use-pure-64bit-configs.patch  | 213 ------------------
 2 files changed, 110 insertions(+), 213 deletions(-)
 create mode 100644 srcpkgs/gcc/patches/consistent-library-paths.patch
 delete mode 100644 srcpkgs/gcc/patches/use-pure-64bit-configs.patch

diff --git a/srcpkgs/gcc/patches/consistent-library-paths.patch b/srcpkgs/gcc/patches/consistent-library-paths.patch
new file mode 100644
index 00000000000..1ec0e258526
--- /dev/null
+++ b/srcpkgs/gcc/patches/consistent-library-paths.patch
@@ -0,0 +1,110 @@
+Always use lib64 for 64-bit and lib32 for 32-bit.
+
+Do not change the dynamic linkers in any way, though.
+
+When adding a new platform, fix this up too.
+
+--- gcc/config/aarch64/t-aarch64-linux
++++ gcc/config/aarch64/t-aarch64-linux
+@@ -22,7 +22,7 @@ LIB1ASMSRC   = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+ 
+ AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++MULTILIB_OSDIRNAMES = mabi.lp64=../lib64
+ MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+ 
+ MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
+--- gcc/config/i386/t-linux64
++++ gcc/config/i386/t-linux64
+@@ -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=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+ MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
+--- gcc/config/mips/t-linux64
++++ gcc/config/mips/t-linux64
+@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
+ MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
+ 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 \
++	../lib \
++	../lib64
+--- gcc/config/rs6000/t-linux
++++ gcc/config/rs6000/t-linux
+@@ -2,7 +2,8 @@
+ # or soft-float.
+ ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
+ ifneq (,$(findstring powerpc64,$(target)))
+-MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ else
+ MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
+ endif
+@@ -10,7 +11,8 @@ ifneq (,$(findstring powerpcle,$(target)))
+ MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
+ endif
+ ifneq (,$(findstring powerpc64le,$(target)))
+-MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ endif
+ endif
+ 
+--- gcc/config/rs6000/t-linux64
++++ gcc/config/rs6000/t-linux64
+@@ -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=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ 
+ rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
+ 	$(COMPILE) $<
+--- gcc/config/rs6000/t-linux64bele
++++ gcc/config/rs6000/t-linux64bele
+@@ -2,6 +2,6 @@
+ 
+ MULTILIB_OPTIONS    += mlittle
+ MULTILIB_DIRNAMES   += le
+-MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))))))
+-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES)))
++MULTILIB_OSDIRNAMES = m64=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+ MULTILIB_MATCHES    := ${MULTILIB_MATCHES_ENDIAN}
+--- gcc/config/rs6000/t-linux64lebe
++++ gcc/config/rs6000/t-linux64lebe
+@@ -2,6 +2,6 @@
+ 
+ MULTILIB_OPTIONS    += mbig
+ MULTILIB_DIRNAMES   += be
+-MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES))))))
+-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES)))
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ MULTILIB_MATCHES    := ${MULTILIB_MATCHES_ENDIAN}
+--- gcc/config/s390/t-linux64
++++ gcc/config/s390/t-linux64
+@@ -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 = m64=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+-- 
+2.29.2
+
diff --git a/srcpkgs/gcc/patches/use-pure-64bit-configs.patch b/srcpkgs/gcc/patches/use-pure-64bit-configs.patch
deleted file mode 100644
index 3602de66e4f..00000000000
--- a/srcpkgs/gcc/patches/use-pure-64bit-configs.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From e0453ba5a738647f84a6dac9d8551fe8dbfdbece Mon Sep 17 00:00:00 2001
-From: Daniel Kolesa <daniel@octaforge.org>
-Date: Sun, 8 Nov 2020 03:58:09 +0100
-Subject: [PATCH] use pure 64-bit config
-
-avoid using lib64 dirs
-
-when adding a new platform, expand this patch
----
- gcc/config/aarch64/t-aarch64-linux | 2 +-
- gcc/config/i386/linux64.h          | 2 +-
- gcc/config/i386/t-linux64          | 4 ++--
- gcc/config/mips/linux.h            | 4 ++--
- gcc/config/mips/mips.h             | 8 ++++----
- gcc/config/mips/t-linux64          | 6 +++---
- gcc/config/rs6000/linux64.h        | 8 ++++----
- gcc/config/rs6000/t-linux          | 6 ++++--
- gcc/config/rs6000/t-linux64        | 4 ++--
- gcc/config/rs6000/t-linux64bele    | 4 ++--
- gcc/config/rs6000/t-linux64lebe    | 4 ++--
- gcc/config/s390/t-linux64          | 4 ++--
- 12 files changed, 29 insertions(+), 27 deletions(-)
-
-diff --git gcc/config/aarch64/t-aarch64-linux gcc/config/aarch64/t-aarch64-linux
-index 5ad670ba2..e10d58a6c 100644
---- gcc/config/aarch64/t-aarch64-linux
-+++ gcc/config/aarch64/t-aarch64-linux
-@@ -22,7 +22,7 @@ LIB1ASMSRC   = aarch64/lib1funcs.asm
- LIB1ASMFUNCS = _aarch64_sync_cache_range
- 
- AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
--MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
-+MULTILIB_OSDIRNAMES = mabi.lp64=../lib
- MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
- 
- MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
-diff --git gcc/config/i386/linux64.h gcc/config/i386/linux64.h
-index c08221c42..6f18c0214 100644
---- gcc/config/i386/linux64.h
-+++ gcc/config/i386/linux64.h
-@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
- #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_LINKER64 "/lib/ld-linux-x86-64.so.2"
- #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
- 
- #undef MUSL_DYNAMIC_LINKER32
-diff --git gcc/config/i386/t-linux64 gcc/config/i386/t-linux64
-index c686ab2f0..89c183019 100644
---- gcc/config/i386/t-linux64
-+++ gcc/config/i386/t-linux64
-@@ -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
-+MULTILIB_OSDIRNAMES+= m32=../lib32
- MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
-diff --git gcc/config/mips/linux.h gcc/config/mips/linux.h
-index 6f79ac9c0..bddfacd84 100644
---- gcc/config/mips/linux.h
-+++ gcc/config/mips/linux.h
-@@ -24,9 +24,9 @@ along with GCC; see the file COPYING3.  If not see
- #define GLIBC_DYNAMIC_LINKER32 \
-   "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
- #define GLIBC_DYNAMIC_LINKER64 \
--  "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
-+  "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
- #define GLIBC_DYNAMIC_LINKERN32 \
--  "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
-+  "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
- 
- #undef UCLIBC_DYNAMIC_LINKER32
- #define UCLIBC_DYNAMIC_LINKER32 \
-diff --git gcc/config/mips/mips.h gcc/config/mips/mips.h
-index 953d82e85..3f09f21bc 100644
---- gcc/config/mips/mips.h
-+++ gcc/config/mips/mips.h
-@@ -3447,11 +3447,11 @@ struct GTY(())  machine_function {
- /* If we are *not* using multilibs and the default ABI is not ABI_32 we
-    need to change these from /lib and /usr/lib.  */
- #if MIPS_ABI_DEFAULT == ABI_N32
--#define STANDARD_STARTFILE_PREFIX_1 "/lib32/"
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib32/"
-+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
- #elif MIPS_ABI_DEFAULT == ABI_64
--#define STANDARD_STARTFILE_PREFIX_1 "/lib64/"
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib64/"
-+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
- #endif
- 
- /* Load store bonding is not supported by micromips and fix_24k.  The
-diff --git gcc/config/mips/t-linux64 gcc/config/mips/t-linux64
-index 3a2ff700d..3b253aeb9 100644
---- gcc/config/mips/t-linux64
-+++ gcc/config/mips/t-linux64
-@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
- MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
- 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))
-+	../lib \
-+	../lib32 \
-+	../lib
-diff --git gcc/config/rs6000/linux64.h gcc/config/rs6000/linux64.h
-index 9946d3fed..fcdf0d265 100644
---- gcc/config/rs6000/linux64.h
-+++ gcc/config/rs6000/linux64.h
-@@ -427,12 +427,12 @@ extern int dot_symbols;
- 
- #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:%(dynamic_linker_prefix)/lib/ld64.so.1;" \
-+":%(dynamic_linker_prefix)/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:%(dynamic_linker_prefix)/lib/ld64.so.2;" \
-+":%(dynamic_linker_prefix)/lib/ld64.so.1}"
- #endif
- 
- #undef MUSL_DYNAMIC_LINKER32
-diff --git gcc/config/rs6000/t-linux gcc/config/rs6000/t-linux
-index aeb7440c4..ab14c455d 100644
---- gcc/config/rs6000/t-linux
-+++ gcc/config/rs6000/t-linux
-@@ -2,7 +2,8 @@
- # or soft-float.
- ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
- ifneq (,$(findstring powerpc64,$(target)))
--MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
-+MULTILIB_OSDIRNAMES := m64=../lib
-+MULTILIB_OSDIRNAMES += m32=../lib32
- else
- MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
- endif
-@@ -10,7 +11,8 @@ ifneq (,$(findstring powerpcle,$(target)))
- MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
- endif
- ifneq (,$(findstring powerpc64le,$(target)))
--MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
-+MULTILIB_OSDIRNAMES := m64=../lib
-+MULTILIB_OSDIRNAMES += m32=../lib32
- endif
- endif
- 
-diff --git gcc/config/rs6000/t-linux64 gcc/config/rs6000/t-linux64
-index f3c6e2be1..f4df2377d 100644
---- gcc/config/rs6000/t-linux64
-+++ gcc/config/rs6000/t-linux64
-@@ -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
-+MULTILIB_OSDIRNAMES += m32=../lib32
- 
- rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
- 	$(COMPILE) $<
-diff --git gcc/config/rs6000/t-linux64bele gcc/config/rs6000/t-linux64bele
-index 97c1ee6fb..08d72639c 100644
---- gcc/config/rs6000/t-linux64bele
-+++ gcc/config/rs6000/t-linux64bele
-@@ -2,6 +2,6 @@
- 
- MULTILIB_OPTIONS    += mlittle
- MULTILIB_DIRNAMES   += le
--MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))))))
--MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES)))
-+MULTILIB_OSDIRNAMES = m64=../lib
-+MULTILIB_OSDIRNAMES+= m32=../lib32
- MULTILIB_MATCHES    := ${MULTILIB_MATCHES_ENDIAN}
-diff --git gcc/config/rs6000/t-linux64lebe gcc/config/rs6000/t-linux64lebe
-index 2e63bdb9f..c6e1c5db6 100644
---- gcc/config/rs6000/t-linux64lebe
-+++ gcc/config/rs6000/t-linux64lebe
-@@ -2,6 +2,6 @@
- 
- MULTILIB_OPTIONS    += mbig
- MULTILIB_DIRNAMES   += be
--MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES))))))
--MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES)))
-+MULTILIB_OSDIRNAMES := m64=../lib
-+MULTILIB_OSDIRNAMES += m32=../lib32
- MULTILIB_MATCHES    := ${MULTILIB_MATCHES_ENDIAN}
-diff --git gcc/config/s390/t-linux64 gcc/config/s390/t-linux64
-index cc6ab3670..7f498ee1c 100644
---- gcc/config/s390/t-linux64
-+++ gcc/config/s390/t-linux64
-@@ -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 = m64=../lib
-+MULTILIB_OSDIRNAMES+= m32=../lib32
--- 
-2.29.2
-

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc: fix dynamic linker paths and default os library paths
  2020-12-19  5:01 [PR PATCH] gcc: fix dynamic linker paths and default os library paths q66
@ 2020-12-19  5:15 ` q66
  2020-12-19  5:16 ` q66
  2020-12-20 23:00 ` [PR PATCH] [Merged]: " q66
  2 siblings, 0 replies; 4+ messages in thread
From: q66 @ 2020-12-19  5:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 908 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/27269#issuecomment-748421346

Comment:
Next steps that should follow:

1) change the `libdir` in `glibc` template to `/usr/lib64` for all 64-bit platforms and `/usr/lib32` for all 32-bit platforms, instead of `/usr/lib` for all other than `i686`
2) do the same as above in all of our build-styles
3) fix and rebuild major templates that are known to be affected by this: notably `mesa`, `pulseaudio`, `imlib2`; rebuild more as they are found

if we do all this, it should be possible to create "multilib" prefixes regardless of architecture and libc, e.g. by having `/usr/mymultilib` with a 32-bit Void of some architecture/libc (handle package installations in it with just `xbps-install` into the root) and then symlinking its dynamic linker to the right path + symlinking its `usr/lib` to `/usr/lib32`

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc: fix dynamic linker paths and default os library paths
  2020-12-19  5:01 [PR PATCH] gcc: fix dynamic linker paths and default os library paths q66
  2020-12-19  5:15 ` q66
@ 2020-12-19  5:16 ` q66
  2020-12-20 23:00 ` [PR PATCH] [Merged]: " q66
  2 siblings, 0 replies; 4+ messages in thread
From: q66 @ 2020-12-19  5:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/27269#issuecomment-748421346

Comment:
Next steps that should follow:

1) change the `libdir` in `glibc` template to `/usr/lib64` for all 64-bit platforms and `/usr/lib32` for all 32-bit platforms, instead of `/usr/lib` for all other than `i686`
2) do the same as above in all of our build-styles, and in cross-toolchains
3) fix and rebuild major templates that are known to be affected by this: notably `mesa`, `pulseaudio`, `imlib2`; rebuild more as they are found

if we do all this, it should be possible to create "multilib" prefixes regardless of architecture and libc, e.g. by having `/usr/mymultilib` with a 32-bit Void of some architecture/libc (handle package installations in it with just `xbps-install` into the root) and then symlinking its dynamic linker to the right path + symlinking its `usr/lib` to `/usr/lib32`

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: gcc: fix dynamic linker paths and default os library paths
  2020-12-19  5:01 [PR PATCH] gcc: fix dynamic linker paths and default os library paths q66
  2020-12-19  5:15 ` q66
  2020-12-19  5:16 ` q66
@ 2020-12-20 23:00 ` q66
  2 siblings, 0 replies; 4+ messages in thread
From: q66 @ 2020-12-20 23:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]

There's a merged pull request on the void-packages repository

gcc: fix dynamic linker paths and default os library paths
https://github.com/void-linux/void-packages/pull/27269

Description:
Void used to mess with the dynamic linker paths, which is very wrong, so it's time to change that. The reason this was done was
because the lib32/64 symlinks were not available in unconfigured chroots (since base-files used to create them during configuration) and this has not been the case for a while, so there is nothing blocking this.

While at it, change the library paths to lib64 for 64-bit systems and lib32 for 32-bit systems. This merely changes the toolchain
and usually does not have much of an effect; dynamic libraries do not contain the paths (the search paths are controlled by
the dynamic linker). The lib32/64 symlinks are contained in base-files, so there is no harm in having this be consistent.

(no revbump: there is no harm in just preparing this before merging gcc10)

[ci skip]

@leahneukirchen 
@void-linux/pkg-committers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-20 23:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-19  5:01 [PR PATCH] gcc: fix dynamic linker paths and default os library paths q66
2020-12-19  5:15 ` q66
2020-12-19  5:16 ` q66
2020-12-20 23:00 ` [PR PATCH] [Merged]: " q66

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).