This patch is to add another set of multilibs to the mips-mti-* targets.  The
new multilibs are for programs compiled and linked with -mfp64 using the
old 32 bit ABI.  They are only going to be built for the mips32r2 architecture
in order to reduce the number of new libraries being added.

I also did a little rearranging of the MULTILIB_OPTIONS while adding this.
Before I had 'msoft-float/mnan=2008' because I wasn't building soft-float
libraries that supported the ieee2008 NAN format.  But with mfp64 it made
more sense to use 'msoft-float/mfp64' because there are 3 basic options for
floating point registers; none, 32 bit, or 64 bit.  I then made mnan=2008
a seperate entry and added a MULTILIB_EXCEPTIONS to avoid building multilibs
with soft-float and nan2008.

OK to checkin?


2013-11-06  Steve Ellcey  <sell...@mips.com>

        * config/mips/mti-linux.h (SYSROOT_SUFFIX_SPEC): Add fp64 directory.
        * config/mips/t-mti-linux (MULTILIB_OPTIONS): Add -mfp64 flag.
        (MULTILIB_DIRNAMES): Add fp64 directory.
        (MULTILIB_EXCEPTIONS): Add new exclusions.


diff --git a/gcc/config/mips/mti-linux.h b/gcc/config/mips/mti-linux.h
index 96dcac4..194fd1d 100644
--- a/gcc/config/mips/mti-linux.h
+++ b/gcc/config/mips/mti-linux.h
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3.  If not see
 /* This target is a multilib target, specify the sysroot paths.  */
 #undef SYSROOT_SUFFIX_SPEC
 #define SYSROOT_SUFFIX_SPEC \
-    
"%{mips32:/mips32}%{mips64:/mips64}%{mips64r2:/mips64r2}%{mips16:/mips16}%{mmicromips:/micromips}%{mabi=64:/64}%{mel|EL:/el}%{msoft-float:/sof}%{mnan=2008:/nan2008}"
+    
"%{mips32:/mips32}%{mips64:/mips64}%{mips64r2:/mips64r2}%{mips16:/mips16}%{mmicromips:/micromips}%{mabi=64:/64}%{mel|EL:/el}%{msoft-float:/sof}%{mfp64:/fp64}%{mnan=2008:/nan2008}"
 
 #undef DRIVER_SELF_SPECS
 #define DRIVER_SELF_SPECS                                              \
diff --git a/gcc/config/mips/t-mti-elf b/gcc/config/mips/t-mti-elf
index 4aec70c..4518858 100644
--- a/gcc/config/mips/t-mti-elf
+++ b/gcc/config/mips/t-mti-elf
@@ -19,8 +19,8 @@
 # The default build is mips32r2, hard-float big-endian.  Add mips32,
 # soft-float, and little-endian variations.
 
-MULTILIB_OPTIONS = mips32/mips64/mips64r2 mips16/mmicromips mabi=64 EL 
msoft-float/mnan=2008
-MULTILIB_DIRNAMES = mips32 mips64 mips64r2 mips16 micromips 64 el sof nan2008
+MULTILIB_OPTIONS = mips32/mips64/mips64r2 mips16/mmicromips mabi=64 EL 
msoft-float/mfp64 mnan=2008
+MULTILIB_DIRNAMES = mips32 mips64 mips64r2 mips16 micromips 64 el sof fp64 
nan2008
 MULTILIB_MATCHES = EL=mel EB=meb
 
 # The 64 bit ABI is not supported on the mips32 architecture.
@@ -40,3 +40,11 @@ MULTILIB_EXCEPTIONS += *mips16/mabi=64*
 MULTILIB_EXCEPTIONS += *mips64*/mmicromips*
 MULTILIB_EXCEPTIONS += *mips32/mmicromips*
 MULTILIB_EXCEPTIONS += *mmicromips/mabi=64*
+
+# We do not want nan2008 libraries for soft-float.
+MULTILIB_EXCEPTIONS += *msoft-float*/*mnan=2008*
+
+# -mfp64 libraries are only built for mips32r2 and not in mips16 mode.
+MULTILIB_EXCEPTIONS += *mips32*/*mfp64*
+MULTILIB_EXCEPTIONS += *mips64*/*mfp64*
+MULTILIB_EXCEPTIONS += *mips16*/*mfp64*
diff --git a/gcc/config/mips/t-mti-linux b/gcc/config/mips/t-mti-linux
index 4aec70c..4518858 100644
--- a/gcc/config/mips/t-mti-linux
+++ b/gcc/config/mips/t-mti-linux
@@ -19,8 +19,8 @@
 # The default build is mips32r2, hard-float big-endian.  Add mips32,
 # soft-float, and little-endian variations.
 
-MULTILIB_OPTIONS = mips32/mips64/mips64r2 mips16/mmicromips mabi=64 EL 
msoft-float/mnan=2008
-MULTILIB_DIRNAMES = mips32 mips64 mips64r2 mips16 micromips 64 el sof nan2008
+MULTILIB_OPTIONS = mips32/mips64/mips64r2 mips16/mmicromips mabi=64 EL 
msoft-float/mfp64 mnan=2008
+MULTILIB_DIRNAMES = mips32 mips64 mips64r2 mips16 micromips 64 el sof fp64 
nan2008
 MULTILIB_MATCHES = EL=mel EB=meb
 
 # The 64 bit ABI is not supported on the mips32 architecture.
@@ -40,3 +40,11 @@ MULTILIB_EXCEPTIONS += *mips16/mabi=64*
 MULTILIB_EXCEPTIONS += *mips64*/mmicromips*
 MULTILIB_EXCEPTIONS += *mips32/mmicromips*
 MULTILIB_EXCEPTIONS += *mmicromips/mabi=64*
+
+# We do not want nan2008 libraries for soft-float.
+MULTILIB_EXCEPTIONS += *msoft-float*/*mnan=2008*
+
+# -mfp64 libraries are only built for mips32r2 and not in mips16 mode.
+MULTILIB_EXCEPTIONS += *mips32*/*mfp64*
+MULTILIB_EXCEPTIONS += *mips64*/*mfp64*
+MULTILIB_EXCEPTIONS += *mips16*/*mfp64*

Reply via email to