aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@mips.com>2012-09-19 20:23:34 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2012-09-19 20:23:34 +0000
commit992bcfac4d53802595375bdbcd329b9db91d66fd (patch)
tree9fabe5bbd38ee6baba6607ff431bb28a2e65e251
parent5368224f426c0dbe08a42e89d4cd18b0c8435834 (diff)
downloadgcc-992bcfac4d53802595375bdbcd329b9db91d66fd.zip
gcc-992bcfac4d53802595375bdbcd329b9db91d66fd.tar.gz
gcc-992bcfac4d53802595375bdbcd329b9db91d66fd.tar.bz2
config.gcc (mips*-mti-elf*): New target.
2012-09-19 Steve Ellcey <sellcey@mips.com> * config.gcc (mips*-mti-elf*): New target. * config/mips/mti-elf.h: New file. * config/mips/t-mti-elf: New file. From-SVN: r191496
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config.gcc5
-rw-r--r--gcc/config/mips/mti-elf.h43
-rw-r--r--gcc/config/mips/t-mti-elf35
4 files changed, 89 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d3222b8..5fdfc47 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-19 Steve Ellcey <sellcey@mips.com>
+
+ * config.gcc (mips*-mti-elf*): New target.
+ * config/mips/mti-elf.h: New file.
+ * config/mips/t-mti-elf: New file.
+
2012-09-19 Dehao Chen <dehao@google.com>
* toplev.c (general_init): Init block_locations.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 4d6b3ac..dfce1e8 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1742,6 +1742,11 @@ mips*-*-linux*) # Linux MIPS, either endian.
esac
test x$with_llsc != x || with_llsc=yes
;;
+mips*-mti-elf*)
+ tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/sde.h mips/mti-elf.h"
+ tmake_file="mips/t-mti-elf"
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
+ ;;
mips*-sde-elf*)
tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/sde.h"
tmake_file="mips/t-sde"
diff --git a/gcc/config/mips/mti-elf.h b/gcc/config/mips/mti-elf.h
new file mode 100644
index 0000000..f6b38a5
--- /dev/null
+++ b/gcc/config/mips/mti-elf.h
@@ -0,0 +1,43 @@
+/* Target macros for mips*-mti-elf targets.
+ Copyright (C) 2012
+ Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#undef DRIVER_SELF_SPECS
+#define DRIVER_SELF_SPECS \
+ /* Make sure a -mips option is present. This helps us to pick \
+ the right multilib, and also makes the later specs easier \
+ to write. */ \
+ MIPS_ISA_LEVEL_SPEC, \
+ \
+ /* Infer the default float setting from -march. */ \
+ MIPS_ARCH_FLOAT_SPEC, \
+ \
+ /* Infer the -msynci setting from -march if not explicitly set. */ \
+ MIPS_ISA_SYNCI_SPEC, \
+ \
+ /* If no ABI option is specified, infer one from the ISA level \
+ or -mgp setting. */ \
+ "%{!mabi=*: %{" MIPS_32BIT_OPTION_SPEC ": -mabi=32;: -mabi=n32}}", \
+ \
+ /* Make sure that an endian option is always present. This makes \
+ things like LINK_SPEC easier to write. */ \
+ "%{!EB:%{!EL:%(endian_spec)}}", \
+ \
+ /* Configuration-independent MIPS rules. */ \
+ BASE_DRIVER_SELF_SPECS
diff --git a/gcc/config/mips/t-mti-elf b/gcc/config/mips/t-mti-elf
new file mode 100644
index 0000000..d1d975a
--- /dev/null
+++ b/gcc/config/mips/t-mti-elf
@@ -0,0 +1,35 @@
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+MULTILIB_OPTIONS = mips32/mips64/mips64r2 mips16 mabi=64 EL msoft-float
+MULTILIB_DIRNAMES = mips32 mips64 mips64r2 mips16 64 el sof
+MULTILIB_MATCHES = EL=mel EB=meb
+
+# We do not want to build mips16 versions of mips64* architectures.
+MULTILIB_EXCEPTIONS += *mips64*/*mips16*
+
+# 64 bit ABI is not supported on mips32 architecture.
+MULTILIB_EXCEPTIONS += *mips32*/*mabi=64*
+
+# The 64 bit ABI is not supported on the mips32r2 bit architecture.
+# Because mips32r2 is the default the exception list is a little messy.
+# Basically we are saying any list that doesn't specify mips32, mips64,
+# or mips64r2 but does specify mabi=64 is not allowed because that
+# would be defaulting to the mips32r2 architecture.
+MULTILIB_EXCEPTIONS += mabi=64*
+MULTILIB_EXCEPTIONS += mips16/mabi=64*