/usr/src/gcc-4.6/debian/patches/mips-triarch.diff is in gcc-4.6-source 4.6.4-6ubuntu2.
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 | # DP: Build a tri-arch compiler on mips-linux-gnu.
# DP: http://gcc.gnu.org/ml/gcc-patches/2009-03/msg01047.html
2009-06-13 Matthias Klose <doko@debian.org>
Arthur Loiret <aloiret@debian.org>
* config.gcc (mips*-*-linux*): If 'enabled_targets' is 'all', build
a tri-arch compiler defaulting to 32-bit (ABI o32). In this case:
(tm_file): Add mips/linux64.h.
(tmake_file): Add mips/t-linux64.
(tm_defines): Add MIPS_ABI_DEFAULT=ABI_32.
* config/mips/linux64.h (DRIVER_SELF_SPECS): Use MULTILIB_ABI_DEFAULT
instead of hardcoded mabi=n32.
* config/mips/t-linux64 (MULTILIB_DIRNAMES): Set to 'n32 . 64' if
tm_defines contains MIPS_ABI_DEFAULT ABI_32, to follow the glibc
convention.
* doc/install.texi: Add mips-linux to the list of targets supporting
--enable-targets=all. Document the effect on mips.
--- a/src/gcc/config.gcc
+++ b/src/gcc/config.gcc
@@ -1902,6 +1902,11 @@
mips*-*-linux*) # Linux MIPS, either endian.
tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/linux.h"
tmake_file="${tmake_file} mips/t-libgcc-mips16"
+ if test x$enable_targets = xall; then
+ tm_file="${tm_file} mips/linux64.h"
+ tmake_file="${tmake_file} mips/t-linux64"
+ tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
+ fi
case ${target} in
mipsisa32r2*)
tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
--- a/src/gcc/config/mips/linux64.h
+++ b/src/gcc/config/mips/linux64.h
@@ -26,7 +26,7 @@
BASE_DRIVER_SELF_SPECS, \
LINUX_DRIVER_SELF_SPECS \
" %{!EB:%{!EL:%(endian_spec)}}" \
- " %{!mabi=*: -mabi=n32}"
+ " %{!mabi=*: -" MULTILIB_ABI_DEFAULT "}"
#undef LIB_SPEC
#define LIB_SPEC "\
|