/usr/src/gcc-4.7/debian/patches/gcc-multiarch-trunk.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 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 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | # DP: Add multiarch support to GCC.
# DP:
# DP: Convert the multilib option to a target triplet,
# DP: add multiarch include directories and libraries path:
# DP: /usr/local/include/<arch>-linux-gnu
# DP: /usr/include/<arch>-linux-gnu
# DP: /usr/lib/<arch>-linux-gnu
# DP: to the system paths.
2012-11-14 Matthias Klose <doko@ubuntu.com>
* config/alpha/t-linux: New file; define MULTIARCH_DIRNAME.
* config.gcc <alpha*-*-linux*> (tmake_file): Include alpha/t-linux.
2012-11-14 Matthias Klose <doko@ubuntu.com>
* config/arm/t-linux-eabi: Define MULTIARCH_DIRNAME for linux target.
2012-11-14 Matthias Klose <doko@ubuntu.com>
* config/ia64/t-linux: New file; define MULTIARCH_DIRNAME.
* config.gcc <ia64*-*-linux*> (tmake_file): Include ia64/t-linux.
2012-11-14 Matthias Klose <doko@ubuntu.com>
* config/m68k/t-linux: Define MULTIARCH_DIRNAME.
2012-11-14 Matthias Klose <doko@ubuntu.com>
* config/mips/t-linux64: Add multiarch names in MULTILIB_OSDIRNAMES.
2012-11-14 Matthias Klose <doko@ubuntu.com>
* config/rs6000/t-linux64: Add multiarch names in MULTILIB_OSDIRNAMES.
* config/rs6000/t-linux: New file; define MULTIARCH_DIRNAME.
* config/rs6000/t-spe: Define MULTIARCH_DIRNAME.
* config.gcc <powerpc-*-linux* | powerpc64-*-linux*> (tmake_file):
Include rs6000/t-linux for 32bit non-biarch configurations.
2012-11-14 Matthias Klose <doko@ubuntu.com>
* config/s390/t-linux64: Add multiarch names in MULTILIB_OSDIRNAMES.
--- a/src/gcc/config/mips/t-linux64 (revision 193508)
+++ b/src/gcc/config/mips/t-linux64 (working copy)
@@ -18,4 +18,9 @@
MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
MULTILIB_DIRNAMES = n32 32 64
-MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
+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))
--- a/src/gcc/config/arm/t-linux-eabi (revision 193508)
+++ b/src/gcc/config/arm/t-linux-eabi (working copy)
@@ -24,3 +24,6 @@
#MULTILIB_OPTIONS += mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te
#MULTILIB_DIRNAMES += fa606te fa626te fmp626 fa726te
#MULTILIB_EXCEPTIONS += *mthumb/*mcpu=fa606te *mthumb/*mcpu=fa626te *mthumb/*mcpu=fmp626 *mthumb/*mcpu=fa726te*
+
+ARM_EB = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),eb)
+MULTIARCH_DIRNAME = $(call if_multiarch,arm$(ARM_EB)-linux-gnueabi$(if $(filter hard,$(with_float)),hf))
--- a/src/gcc/config/alpha/t-linux (revision 0)
+++ b/src/gcc/config/alpha/t-linux (revision 0)
@@ -0,0 +1 @@
+MULTIARCH_DIRNAME = $(call if_multiarch,alpha-linux-gnu)
--- a/src/gcc/config/s390/t-linux64 (revision 193508)
+++ b/src/gcc/config/s390/t-linux64 (working copy)
@@ -7,4 +7,5 @@
MULTILIB_OPTIONS = m64/m31
MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+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)
--- a/src/gcc/config/rs6000/t-linux64 (revision 193508)
+++ b/src/gcc/config/rs6000/t-linux64 (working copy)
@@ -29,4 +29,5 @@
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
MULTILIB_EXTRA_OPTS = fPIC
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
--- a/src/gcc/config/rs6000/t-spe (revision 193508)
+++ b/src/gcc/config/rs6000/t-spe (working copy)
@@ -71,3 +71,6 @@
mabi=altivec/mlittle \
maltivec/mlittle \
maltivec/mabi=altivec/mlittle
+
+MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring rs6000/e500-double.h, $(tm_file)),,v1)
+
--- a/src/gcc/config/rs6000/t-linux (revision 0)
+++ b/src/gcc/config/rs6000/t-linux (revision 0)
@@ -0,0 +1 @@
+MULTIARCH_DIRNAME = powerpc-linux-gnu
--- a/src/gcc/config/sh/t-linux (revision 193508)
+++ b/src/gcc/config/sh/t-linux (working copy)
@@ -1,2 +1,4 @@
MULTILIB_DIRNAMES=
MULTILIB_MATCHES =
+
+MULTILIB_OSDIRNAMES = sh4-linux-gnu:sh4-linux-gnu sh4_nofpu-linux-gnu:sh4-linux-gnu
--- a/src/gcc/config/ia64/t-linux (revision 0)
+++ b/src/gcc/config/ia64/t-linux (revision 0)
@@ -0,0 +1 @@
+MULTIARCH_DIRNAME = $(call if_multiarch,ia64-linux-gnu)
--- a/src/gcc/config/m68k/t-linux (revision 193508)
+++ b/src/gcc/config/m68k/t-linux (working copy)
@@ -19,6 +19,8 @@
# Only include multilibs for 680x0 and ColdFire CPUs with an MMU.
M68K_MLIB_CPU += && ((CPU ~ "^m680") || (CPU ~ "^mcf")) && (FLAGS ~ "FL_MMU")
+MULTIARCH_DIRNAME = $(call if_multiarch,m68k-linux-gnu)
+
# This rule uses MULTILIB_MATCHES to generate a definition of
# SYSROOT_SUFFIX_SPEC.
sysroot-suffix.h: $(srcdir)/config/m68k/print-sysroot-suffix.sh
--- a/src/gcc/config.gcc (revision 193508)
+++ b/src/gcc/config.gcc (working copy)
@@ -831,6 +831,7 @@
;;
alpha*-*-linux*)
tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
+ tmake_file="${tmake_file} alpha/t-linux"
extra_options="${extra_options} alpha/elf.opt"
;;
alpha*-*-freebsd*)
@@ -1550,7 +1553,7 @@
;;
ia64*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind"
+ tmake_file="${tmake_file} ia64/t-ia64 ia64/t-glibc t-libunwind"
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
;;
ia64*-*-hpux*)
@@ -2057,6 +2060,7 @@
;;
*)
tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
+ tmake_file="$tmake_file rs6000/t-linux"
;;
esac
case ${target} in
|