1
# DP: - Remaining multiarch patches, not yet submitted upstream.
2
# DP: - Add MULTIARCH_DIRNAME definitions for multilib configurations,
3
# DP: which are used for the non-multilib builds.
5
2013-06-12 Matthias Klose <doko@ubuntu.com>
7
* config/i386/t-linux64: Set MULTIARCH_DIRNAME.
8
* config/i386/t-kfreebsd: Set MULTIARCH_DIRNAME.
9
* config.gcc (i[34567]86-*-linux* | x86_64-*-linux*): Prepend
10
i386/t-linux to $tmake_file.
11
* config/mips/t-linux64: Set MULTIARCH_DIRNAME.
12
* config/rs6000/t-linux64: Set MULTIARCH_DIRNAME.
13
* config/s390/t-linux64: Set MULTIARCH_DIRNAME.
14
* config/sparc/t-linux64: Set MULTIARCH_DIRNAME.
16
Index: b/src/libstdc++-v3/python/hook.in
17
===================================================================
18
--- a/src/libstdc++-v3/python/hook.in
19
+++ b/src/libstdc++-v3/python/hook.in
21
libdir = libdir[len (prefix):]
23
# Compute the ".."s needed to get from libdir to the prefix.
24
- dotdots = ('..' + os.sep) * len (libdir.split (os.sep))
25
+ backdirs = len (libdir.split (os.sep))
26
+ if not os.path.basename(os.path.dirname(__file__)).startswith('lib'):
27
+ backdirs += 1 # multiarch subdir
28
+ dotdots = ('..' + os.sep) * backdirs
30
objfile = gdb.current_objfile ().filename
31
dir_ = os.path.join (os.path.dirname (objfile), dotdots, pythondir)
33
- if not dir_ in sys.path:
34
+ if not objfile.startswith('/usr/lib/debug/') and not dir_ in sys.path:
35
sys.path.insert(0, dir_)
37
# Load the pretty-printers.
38
-from libstdcxx.v6.printers import register_libstdcxx_printers
39
-register_libstdcxx_printers (gdb.current_objfile ())
40
+if gdb.current_objfile () is None or not gdb.current_objfile ().filename.startswith ('/usr/lib/debug/'):
41
+ from libstdcxx.v6.printers import register_libstdcxx_printers
42
+ register_libstdcxx_printers (gdb.current_objfile ())
43
Index: b/src/gcc/config/sh/t-linux
44
===================================================================
45
--- a/src/gcc/config/sh/t-linux
46
+++ b/src/gcc/config/sh/t-linux
51
+MULTILIB_OSDIRNAMES = sh4-linux-gnu:sh4-linux-gnu sh4_nofpu-linux-gnu:sh4-linux-gnu
52
Index: b/src/gcc/config/sparc/t-linux64
53
===================================================================
54
--- a/src/gcc/config/sparc/t-linux64
55
+++ b/src/gcc/config/sparc/t-linux64
57
MULTILIB_DIRNAMES = 64 32
58
MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:sparc64-linux-gnu)
59
MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:sparc-linux-gnu)
61
+MULTIARCH_DIRNAME = $(call if_multiarch,sparc$(if $(findstring 64,$(target)),64)-linux-gnu)
62
Index: b/src/gcc/config/s390/t-linux64
63
===================================================================
64
--- a/src/gcc/config/s390/t-linux64
65
+++ b/src/gcc/config/s390/t-linux64
67
MULTILIB_DIRNAMES = 64 32
68
MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
69
MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
71
+MULTIARCH_DIRNAME = $(call if_multiarch,s390$(if $(findstring s390x,$(target)),x)-linux-gnu)
72
Index: b/src/gcc/config/rs6000/t-linux
73
===================================================================
74
--- a/src/gcc/config/rs6000/t-linux
75
+++ b/src/gcc/config/rs6000/t-linux
78
ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
79
ifneq (,$(findstring spe,$(target)))
80
-MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring rs6000/e500-double.h, $(tm_file_list)),,v1)
81
+MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring 8548,$(with_cpu)),,v1)
83
MULTIARCH_DIRNAME = powerpc-linux-gnu
85
Index: b/src/gcc/config/rs6000/t-linux64
86
===================================================================
87
--- a/src/gcc/config/rs6000/t-linux64
88
+++ b/src/gcc/config/rs6000/t-linux64
90
MULTILIB_EXTRA_OPTS = fPIC
91
MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:powerpc64-linux-gnu)
92
MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
94
+MULTIARCH_DIRNAME = $(call if_multiarch,powerpc$(if $(findstring 64,$(target)),64)-linux-gnu)
95
Index: b/src/gcc/config/i386/t-linux64
96
===================================================================
97
--- a/src/gcc/config/i386/t-linux64
98
+++ b/src/gcc/config/i386/t-linux64
100
MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
101
MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
102
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
104
+ifneq (,$(findstring x86_64,$(target)))
105
+ ifneq (,$(findstring biarchx32.h,$(tm_include_list)))
106
+ MULTIARCH_DIRNAME = $(call if_multiarch,x86_64-linux-gnux32)
108
+ MULTIARCH_DIRNAME = $(call if_multiarch,x86_64-linux-gnu)
111
+ MULTIARCH_DIRNAME = $(call if_multiarch,i386-linux-gnu)
113
Index: b/src/gcc/config/i386/t-kfreebsd
114
===================================================================
115
--- a/src/gcc/config/i386/t-kfreebsd
116
+++ b/src/gcc/config/i386/t-kfreebsd
118
-MULTIARCH_DIRNAME = $(call if_multiarch,i386-kfreebsd-gnu)
119
+ifeq (,$(MULTIARCH_DIRNAME))
120
+ MULTIARCH_DIRNAME = $(call if_multiarch,i386-kfreebsd-gnu)
123
# MULTILIB_OSDIRNAMES are set in t-linux64.
124
KFREEBSD_OS = $(filter kfreebsd%, $(word 3, $(subst -, ,$(target))))
125
MULTILIB_OSDIRNAMES := $(filter-out mx32=%,$(subst linux,$(KFREEBSD_OS),$(MULTILIB_OSDIRNAMES)))
127
+MULTIARCH_DIRNAME := $(subst linux,$(KFREEBSD_OS),$(MULTIARCH_DIRNAME))
128
Index: b/src/gcc/config.gcc
129
===================================================================
130
--- a/src/gcc/config.gcc
131
+++ b/src/gcc/config.gcc
132
@@ -1806,8 +1806,11 @@
133
mips64*-*-linux* | mipsisa64*-*-linux*)
134
tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h mips/linux-common.h"
135
tmake_file="${tmake_file} mips/t-linux64"
136
- tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
137
+ tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64"
140
+ tm_defines=$(echo ${tm_defines}| sed 's/MIPS_ABI_DEFAULT=ABI_64/MIPS_ABI_DEFAULT=ABI_N32/g')
142
mips64el-st-linux-gnu)
143
tm_file="${tm_file} mips/st.h"
144
tmake_file="${tmake_file} mips/t-st"
145
@@ -3723,7 +3726,7 @@
146
i[34567]86-*-darwin* | x86_64-*-darwin*)
148
i[34567]86-*-linux* | x86_64-*-linux*)
149
- tmake_file="$tmake_file i386/t-linux"
150
+ tmake_file="i386/t-linux $tmake_file"
152
i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
153
tmake_file="$tmake_file i386/t-kfreebsd"
154
Index: b/src/gcc/java/jvspec.c
155
===================================================================
156
--- a/src/gcc/java/jvspec.c
157
+++ b/src/gcc/java/jvspec.c
159
"jvgenmain %{findirect-dispatch} %{D*} %b %m.i |\n\
161
%{!Q:-quiet} -dumpbase %b.c %{d*} %{m*}\
164
%{v:-version} %{pg:-p} %{p}\
165
%<fbounds-check %<fno-bounds-check\
166
%<fassume-compiled* %<fno-assume-compiled*\
167
Index: b/src/gcc/config/aarch64/t-aarch64-linux
168
===================================================================
169
--- a/src/gcc/config/aarch64/t-aarch64-linux
170
+++ b/src/gcc/config/aarch64/t-aarch64-linux
172
LIB1ASMFUNCS = _aarch64_sync_cache_range
174
AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
175
-MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
176
+MULTILIB_OSDIRNAMES = .=../lib$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
177
Index: b/src/gcc/Makefile.in
178
===================================================================
179
--- a/src/gcc/Makefile.in
180
+++ b/src/gcc/Makefile.in
181
@@ -1829,7 +1829,7 @@
182
"$(MULTILIB_EXCLUSIONS)" \
183
"$(MULTILIB_OSDIRNAMES)" \
184
"$(MULTILIB_REQUIRED)" \
185
- "$(MULTIARCH_DIRNAME)" \
186
+ "$(if $(MULTILIB_OSDIRNAMES),,$(MULTIARCH_DIRNAME))" \
187
"$(MULTILIB_REUSE)" \
188
"@enable_multilib@" \