From 992bcfac4d53802595375bdbcd329b9db91d66fd Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Wed, 19 Sep 2012 20:23:34 +0000 Subject: [PATCH] config.gcc (mips*-mti-elf*): New target. 2012-09-19 Steve Ellcey * config.gcc (mips*-mti-elf*): New target. * config/mips/mti-elf.h: New file. * config/mips/t-mti-elf: New file. From-SVN: r191496 --- gcc/ChangeLog | 6 ++++++ gcc/config.gcc | 5 +++++ gcc/config/mips/mti-elf.h | 43 +++++++++++++++++++++++++++++++++++++++ gcc/config/mips/t-mti-elf | 35 +++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 gcc/config/mips/mti-elf.h create mode 100644 gcc/config/mips/t-mti-elf diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d3222b81365d..5fdfc474499e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-09-19 Steve Ellcey + + * 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 * toplev.c (general_init): Init block_locations. diff --git a/gcc/config.gcc b/gcc/config.gcc index 4d6b3aca6ea8..dfce1e8b8d1c 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 000000000000..f6b38a529b2d --- /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 +. */ + +#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 000000000000..d1d975a18c0a --- /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 +# . + +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*