/usr/src/gcc-4.7/debian/patches/gcc-multiarch.diff is in gcc-4.7-source 4.7.3-12ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | # DP: Add multiarch support to GCC (chunks not yet applied upstream).
Index: b/src/libstdc++-v3/python/hook.in
===================================================================
--- a/src/libstdc++-v3/python/hook.in
+++ b/src/libstdc++-v3/python/hook.in
@@ -47,14 +47,18 @@
libdir = libdir[len (prefix):]
# Compute the ".."s needed to get from libdir to the prefix.
- dotdots = ('..' + os.sep) * len (libdir.split (os.sep))
+ backdirs = len (libdir.split (os.sep))
+ if not os.path.basename(os.path.dirname(__file__)).startswith('lib'):
+ backdirs += 1 # multiarch subdir
+ dotdots = ('..' + os.sep) * backdirs
objfile = gdb.current_objfile ().filename
dir_ = os.path.join (os.path.dirname (objfile), dotdots, pythondir)
- if not dir_ in sys.path:
+ if not objfile.startswith('/usr/lib/debug/') and not dir_ in sys.path:
sys.path.insert(0, dir_)
# Load the pretty-printers.
-from libstdcxx.v6.printers import register_libstdcxx_printers
-register_libstdcxx_printers (gdb.current_objfile ())
+if gdb.current_objfile () is None or not gdb.current_objfile ().filename.startswith ('/usr/lib/debug/'):
+ from libstdcxx.v6.printers import register_libstdcxx_printers
+ register_libstdcxx_printers (gdb.current_objfile ())
Index: b/src/gcc/config/sh/t-linux
===================================================================
--- a/src/gcc/config/sh/t-linux
+++ b/src/gcc/config/sh/t-linux
@@ -1,2 +1,4 @@
MULTILIB_DIRNAMES=
MULTILIB_MATCHES =
+
+MULTILIB_OSDIRNAMES = sh4-linux-gnu:sh4-linux-gnu sh4_nofpu-linux-gnu:sh4-linux-gnu
Index: b/src/gcc/config/mips/t-linux
===================================================================
--- /dev/null
+++ b/src/gcc/config/mips/t-linux
@@ -0,0 +1,2 @@
+MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
+MULTIARCH_DIRNAME = $(call if_multiarch,mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT))
Index: b/src/gcc/config/s390/t-linux
===================================================================
--- /dev/null
+++ b/src/gcc/config/s390/t-linux
@@ -0,0 +1 @@
+MULTIARCH_DIRNAME = $(call if_multiarch,s390-linux-gnu)
Index: b/src/gcc/config.gcc
===================================================================
--- a/src/gcc/config.gcc
+++ b/src/gcc/config.gcc
@@ -1828,6 +1828,8 @@
if test x$enable_targets = xall; then
tm_file="${tm_file} mips/gnu-user64.h mips/linux64.h"
tmake_file="${tmake_file} mips/t-linux64"
+ else
+ tmake_file="${tmake_file} mips/t-linux"
fi
case ${target} in
mipsisa32r2*)
@@ -2227,6 +2229,8 @@
tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
if test x$enable_targets = xall; then
tmake_file="${tmake_file} s390/t-linux64"
+ else
+ tmake_file="${tmake_file} s390/t-linux"
fi
;;
s390x-*-linux*)
Index: b/src/gcc/config/i386/t-kfreebsd
===================================================================
--- a/src/gcc/config/i386/t-kfreebsd
+++ b/src/gcc/config/i386/t-kfreebsd
@@ -1,4 +1,6 @@
-MULTIARCH_DIRNAME = $(call if_multiarch,i386-kfreebsd-gnu)
+ifeq (,$(MULTIARCH_DIRNAME))
+ MULTIARCH_DIRNAME = $(call if_multiarch,i386-kfreebsd-gnu)
+endif
# MULTILIB_OSDIRNAMES are set in t-linux64.
KFREEBSD_OS = $(filter kfreebsd%, $(word 3, $(subst -, ,$(target))))
|