===================================================================
@@ -1862,6 +1862,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"
===================================================================
@@ -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 "\
===================================================================
@@ -17,7 +17,11 @@
# <http://www.gnu.org/licenses/>.
MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
+ifneq ($(filter MIPS_ABI_DEFAULT=ABI_32,$(tm_defines)),)
+MULTILIB_DIRNAMES = n32 . 64
+else
MULTILIB_DIRNAMES = n32 32 64
+endif
MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o