From b167b87ffa239c9cd4d39ee472476a799e7c178a Mon Sep 17 00:00:00 2001 From: doko Date: Mon, 11 Jul 2011 11:22:15 +0000 Subject: [PATCH] 2011-07-11 Arthur Loiret Matthias Klose * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176145 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 14 ++++++++++++++ gcc/config.gcc | 5 +++++ gcc/config/mips/linux64.h | 2 +- gcc/config/mips/t-linux64 | 4 ++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c0418d4..59e1fde 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2011-07-11 Arthur Loiret + Matthias Klose + + * 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. + 2011-07-11 Andreas Krebbel * passes.c (init_optimization_passes): Add invariant motion pass diff --git a/gcc/config.gcc b/gcc/config.gcc index c190fa7..e51a44a 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1862,6 +1862,11 @@ mips64*-*-linux* | mipsisa64*-*-linux*) 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" diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h index cde17c5..cfdae5a 100644 --- a/gcc/config/mips/linux64.h +++ b/gcc/config/mips/linux64.h @@ -26,7 +26,7 @@ along with GCC; see the file COPYING3. If not see 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 "\ diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 index 66ea51a..326e646 100644 --- a/gcc/config/mips/t-linux64 +++ b/gcc/config/mips/t-linux64 @@ -17,7 +17,11 @@ # . 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 -- 2.7.4