aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
authormpf <mpf@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-14 08:35:52 +0000
committermpf <mpf@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-14 08:35:52 +0000
commitc1fe1a9836dce7fc050661f4bc5eb633f9fbf053 (patch)
tree8b9800174cf842339809c1c6af9cd49519f3145e /gcc/config/mips
parent0f76de8e3ba79f0317346a270638c84eeef35fd3 (diff)
Fix Linux multilib configurations with default architectures
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219580 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/elfoabi.h3
-rw-r--r--gcc/config/mips/mips.h16
-rw-r--r--gcc/config/mips/mti-elf.h3
-rw-r--r--gcc/config/mips/mti-linux.h3
-rw-r--r--gcc/config/mips/sde.h3
5 files changed, 24 insertions, 4 deletions
diff --git a/gcc/config/mips/elfoabi.h b/gcc/config/mips/elfoabi.h
index b39e76f50f3..695bf418206 100644
--- a/gcc/config/mips/elfoabi.h
+++ b/gcc/config/mips/elfoabi.h
@@ -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. */ \
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 4d417d12717..676bf1d04bd 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -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: \
diff --git a/gcc/config/mips/mti-elf.h b/gcc/config/mips/mti-elf.h
index c37c2c78cf2..1075180983d 100644
--- a/gcc/config/mips/mti-elf.h
+++ b/gcc/config/mips/mti-elf.h
@@ -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. */ \
diff --git a/gcc/config/mips/mti-linux.h b/gcc/config/mips/mti-linux.h
index 2e7c192c963..80d5925919b 100644
--- a/gcc/config/mips/mti-linux.h
+++ b/gcc/config/mips/mti-linux.h
@@ -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. */ \
diff --git a/gcc/config/mips/sde.h b/gcc/config/mips/sde.h
index b43914a7913..3cb64b09656 100644
--- a/gcc/config/mips/sde.h
+++ b/gcc/config/mips/sde.h
@@ -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. */ \