1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
# DP: Don't auto-detect multilib osdirnames.
Index: b/src/gcc/config/sparc/t-linux64
===================================================================
--- a/src/gcc/config/sparc/t-linux64
+++ b/src/gcc/config/sparc/t-linux64
@@ -25,7 +25,12 @@
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
+ifneq (,$(findstring sparc64,$(target)))
+MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:sparc64-linux-gnu)
+MULTILIB_OSDIRNAMES += ../lib32$(call if_multiarch,:sparc-linux-gnu)
+else
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,:sparc-linux-gnu)
+endif
MULTIARCH_DIRNAME = $(call if_multiarch,sparc$(if $(findstring 64,$(target)),64)-linux-gnu)
Index: b/src/gcc/config/s390/t-linux64
===================================================================
--- a/src/gcc/config/s390/t-linux64
+++ b/src/gcc/config/s390/t-linux64
@@ -7,7 +7,12 @@
MULTILIB_OPTIONS = m64/m31
MULTILIB_DIRNAMES = 64 32
+ifneq (,$(findstring s390x,$(target)))
+MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:s390x-linux-gnu)
+MULTILIB_OSDIRNAMES += ../lib32$(call if_multiarch,:s390-linux-gnu)
+else
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,:s390-linux-gnu)
+endif
MULTIARCH_DIRNAME = $(call if_multiarch,s390$(if $(findstring s390x,$(target)),x)-linux-gnu)
Index: b/src/gcc/config/rs6000/t-linux64
===================================================================
--- a/src/gcc/config/rs6000/t-linux64
+++ b/src/gcc/config/rs6000/t-linux64
@@ -28,8 +28,13 @@
MULTILIB_OPTIONS := m64/m32
MULTILIB_DIRNAMES := 64 32
MULTILIB_EXTRA_OPTS :=
+ifneq (,$(findstring powerpc64,$(target)))
+MULTILIB_OSDIRNAMES := m64=../lib$(call if_multiarch,:powerpc64-linux-gnu)
+MULTILIB_OSDIRNAMES += m32=../lib32$(call if_multiarch,:powerpc-linux-gnu)
+else
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 += m32=../lib$(call if_multiarch,:powerpc-linux-gnu)
+endif
MULTIARCH_DIRNAME = $(call if_multiarch,powerpc$(if $(findstring 64,$(target)),64)-linux-gnu)
Index: b/src/gcc/config/i386/t-linux64
===================================================================
--- a/src/gcc/config/i386/t-linux64
+++ b/src/gcc/config/i386/t-linux64
@@ -33,9 +33,19 @@
comma=,
MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
+ifneq (,$(findstring gnux32,$(target)))
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+= m32=../lib32$(call if_multiarch,:i386-linux-gnu)
+MULTILIB_OSDIRNAMES+= mx32=../lib$(call if_multiarch,:x86_64-linux-gnux32)
+else ifneq (,$(findstring x86_64,$(target)))
+MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu)
+MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-linux-gnu)
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
+else
+MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+MULTILIB_OSDIRNAMES+= m32=../lib$(call if_multiarch,:i386-linux-gnu)
+MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
+endif
ifneq (,$(findstring x86_64,$(target)))
ifneq (,$(findstring biarchx32.h,$(tm_include_list)))
Index: b/src/gcc/config/rs6000/t-linux
===================================================================
--- a/src/gcc/config/rs6000/t-linux
+++ b/src/gcc/config/rs6000/t-linux
@@ -2,7 +2,7 @@
# 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 := .=../lib$(call if_multiarch,:powerpc64-linux-gnu)
else
MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
endif
Index: b/src/gcc/config/loongarch/t-linux
===================================================================
--- a/src/gcc/config/loongarch/t-linux
+++ b/src/gcc/config/loongarch/t-linux
@@ -32,22 +32,19 @@ ifneq ($(call if_multiarch,yes),yes)
else
# Only define MULTIARCH_DIRNAME when multiarch is enabled,
# or it would always introduce ${target} into the search path.
- MULTIARCH_DIRNAME = $(LA_MULTIARCH_TRIPLET)
+ MULTIARCH_DIRNAME = $(call if_multiarch,loongarch64-linux-gnu)
endif
# Don't define MULTILIB_OSDIRNAMES if multilib is disabled.
ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),)
MULTILIB_OSDIRNAMES = \
- mabi.lp64d=../lib64$\
- $(call if_multiarch,:loongarch64-linux-gnu)
+ mabi.lp64d=../lib$(call if_multiarch,:loongarch64-linux-gnu)
MULTILIB_OSDIRNAMES += \
- mabi.lp64f=../lib64/f32$\
- $(call if_multiarch,:loongarch64-linux-gnuf32)
+ mabi.lp64f=../lib/f32$(call if_multiarch,:loongarch64-linux-gnuf32)
MULTILIB_OSDIRNAMES += \
- mabi.lp64s=../lib64/sf$\
- $(call if_multiarch,:loongarch64-linux-gnusf)
+ mabi.lp64s=../lib/sf$(call if_multiarch,:loongarch64-linux-gnusf)
endif
|