Fix Linux multilib configurations with default architectures
authorMatthew Fortune <matthew.fortune@imgtec.com>
Wed, 14 Jan 2015 08:35:52 +0000 (08:35 +0000)
committerMatthew Fortune <mpf@gcc.gnu.org>
Wed, 14 Jan 2015 08:35:52 +0000 (08:35 +0000)
gcc/

* config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Only infer an ISA
level from an ARCH; do not inject the default.
(MIPS_DEFAULT_ISA_LEVEL_SPEC): New macro split out from
MIPS_ISA_LEVEL_SPEC.
(MIPS_ISA_NAN2008_SPEC): Update comment.
(BASE_DRIVER_SELF_SPECS): Likewise.
* config/mips/elfoabi.h (DRIVER_SELF_SPECS): Add
MIPS_DEFAULT_ISA_LEVEL_SPEC.
* config/mips/mti-elf.h (DRIVER_SELF_SPECS): Likewise.
* config/mips/mti-linux.h (DRIVER_SELF_SPECS): Likewise.
* config/mips/sde.h (DRIVER_SELF_SPECS): Likewise.

From-SVN: r219580

gcc/ChangeLog
gcc/config/mips/elfoabi.h
gcc/config/mips/mips.h
gcc/config/mips/mti-elf.h
gcc/config/mips/mti-linux.h
gcc/config/mips/sde.h

index 853353878e253befae2f8eca5cf93a801d1eec8e..2f19b4927c8218239e77b556eb2ed447dae74319 100644 (file)
@@ -1,3 +1,17 @@
+2015-01-14  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+       * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Only infer an ISA
+       level from an ARCH; do not inject the default.
+       (MIPS_DEFAULT_ISA_LEVEL_SPEC): New macro split out from
+       MIPS_ISA_LEVEL_SPEC.
+       (MIPS_ISA_NAN2008_SPEC): Update comment.
+       (BASE_DRIVER_SELF_SPECS): Likewise.
+       * config/mips/elfoabi.h (DRIVER_SELF_SPECS): Add
+       MIPS_DEFAULT_ISA_LEVEL_SPEC.
+       * config/mips/mti-elf.h (DRIVER_SELF_SPECS): Likewise.
+       * config/mips/mti-linux.h (DRIVER_SELF_SPECS): Likewise.
+       * config/mips/sde.h (DRIVER_SELF_SPECS): Likewise.
+
 2015-01-14  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/64493
index b39e76f50f3a0ddb096f98eb838a3b610db4b7c2..695bf41820619fa79265700aadf8118c3d3e8abc 100644 (file)
@@ -20,6 +20,9 @@ along with GCC; see the file COPYING3.  If not see
 
 #undef DRIVER_SELF_SPECS
 #define DRIVER_SELF_SPECS                                              \
+  /* Set the ISA for the default multilib.  */                         \
+  MIPS_DEFAULT_ISA_LEVEL_SPEC,                                         \
+                                                                       \
   /* Make sure a -mips option is present.  This helps us to pick       \
      the right multilib, and also makes the later specs easier         \
      to write.  */                                                     \
index 4d417d12717e62633be8e05ab8d0d0dd1c3da9d3..676bf1d04bd87312cf5bdbaf395e4d62ce937810 100644 (file)
@@ -704,8 +704,7 @@ struct mips_cpu_info {
 #define MIPS_ARCH_OPTION_SPEC \
   MIPS_ISA_LEVEL_OPTION_SPEC "|march=*"
 
-/* A spec that infers a -mips argument from an -march argument,
-   or injects the default if no architecture is specified.  */
+/* A spec that infers a -mips argument from an -march argument.  */
 
 #define MIPS_ISA_LEVEL_SPEC \
   "%{" MIPS_ISA_LEVEL_OPTION_SPEC ":;: \
@@ -725,7 +724,13 @@ struct mips_cpu_info {
      %{march=mips64r2|march=loongson3a|march=octeon|march=xlp: -mips64r2} \
      %{march=mips64r3: -mips64r3} \
      %{march=mips64r5: -mips64r5} \
-     %{march=mips64r6: -mips64r6} \
+     %{march=mips64r6: -mips64r6}}"
+
+/* A spec that injects the default multilib ISA if no architecture is
+   specified.  */
+
+#define MIPS_DEFAULT_ISA_LEVEL_SPEC \
+  "%{" MIPS_ISA_LEVEL_OPTION_SPEC ":;: \
      %{!march=*: -" MULTILIB_ISA_DEFAULT "}}"
 
 /* A spec that infers a -mhard-float or -msoft-float setting from an
@@ -757,6 +762,7 @@ struct mips_cpu_info {
   "%{msynci|mno-synci:;:%{mips32r2|mips32r3|mips32r5|mips32r6|mips64r2 \
                          |mips64r3|mips64r5|mips64r6:-msynci;:-mno-synci}}"
 
+/* Infer a -mnan=2008 setting from a -mips argument.  */
 #define MIPS_ISA_NAN2008_SPEC \
   "%{mnan*:;mips32r6|mips64r6:-mnan=2008}"
 
@@ -806,7 +812,9 @@ struct mips_cpu_info {
   {"mips-plt", "%{!mplt:%{!mno-plt:-m%(VALUE)}}" }, \
   {"synci", "%{!msynci:%{!mno-synci:-m%(VALUE)}}" }
 
-/* A spec that infers the -mdsp setting from an -march argument.  */
+/* A spec that infers the:
+   -mnan=2008 setting from a -mips argument,
+   -mdsp setting from a -march argument.  */
 #define BASE_DRIVER_SELF_SPECS \
   MIPS_ISA_NAN2008_SPEC,       \
   "%{!mno-dsp: \
index c37c2c78cf2267b9ee9a3c1e4b31148cfc555471..1075180983dc66abf10c034160d27706ce0576e3 100644 (file)
@@ -19,6 +19,9 @@ along with GCC; see the file COPYING3.  If not see
 
 #undef DRIVER_SELF_SPECS
 #define DRIVER_SELF_SPECS                                              \
+  /* Set the ISA for the default multilib.  */                         \
+  MIPS_DEFAULT_ISA_LEVEL_SPEC,                                         \
+                                                                       \
   /* Make sure a -mips option is present.  This helps us to pick       \
      the right multilib, and also makes the later specs easier         \
      to write.  */                                                     \
index 2e7c192c9634c53cae97d1b4f4ca2f2a0bce2a5b..80d5925919bc0cb8b0b7745896a935c0f7a7cb09 100644 (file)
@@ -31,6 +31,9 @@ along with GCC; see the file COPYING3.  If not see
 
 #undef DRIVER_SELF_SPECS
 #define DRIVER_SELF_SPECS                                              \
+  /* Set the ISA for the default multilib.  */                         \
+  MIPS_DEFAULT_ISA_LEVEL_SPEC,                                         \
+                                                                       \
   /* Make sure a -mips option is present.  This helps us to pick       \
      the right multilib, and also makes the later specs easier         \
      to write.  */                                                     \
index b43914a79136662f01e8a686ea4cc936899d8362..3cb64b09656d3a369fa462cfd85e43d5b7c102bb 100644 (file)
@@ -20,6 +20,9 @@ along with GCC; see the file COPYING3.  If not see
 
 #undef DRIVER_SELF_SPECS
 #define DRIVER_SELF_SPECS                                              \
+  /* Set the ISA for the default multilib.  */                         \
+  MIPS_DEFAULT_ISA_LEVEL_SPEC,                                         \
+                                                                       \
   /* Make sure a -mips option is present.  This helps us to pick       \
      the right multilib, and also makes the later specs easier         \
      to write.  */                                                     \