config.gcc (v850-*-rtems*): New target.
authorRalf Corsepius <ralf.corsepius@rtems.org>
Wed, 18 Jul 2012 15:29:51 +0000 (17:29 +0200)
committerRalf Corsepius <corsepiu@gcc.gnu.org>
Wed, 18 Jul 2012 15:29:51 +0000 (17:29 +0200)
2012-07-18  Ralf Corsépius  <ralf.corsepius@rtems.org>

       * config.gcc (v850-*-rtems*): New target.
       * config/v850/rtems.h: New.
       * config/v850/t-rtems: New.

From-SVN: r189618

gcc/ChangeLog
gcc/config.gcc
gcc/config/v850/rtems.h [new file with mode: 0644]
gcc/config/v850/t-rtems [new file with mode: 0644]

index 37490ee5306c4e8e1aa93ae59478e4025a22df52..2de60775883a3ea2729720f30d34d24336903e1b 100644 (file)
@@ -1,3 +1,9 @@
+2012-07-18  Ralf Corsépius  <ralf.corsepius@rtems.org>
+
+       * config.gcc (v850-*-rtems*): New target.
+       * config/v850/rtems.h: New.
+       * config/v850/t-rtems: New.
+
 2012-07-18  Bill Schmidt  <wschmidt@linux.ibm.com>
 
        * doc/invoke.texi: Add -fhoist-adjacent-loads and -ftree-slsr to list
index 7768917f914bcff62c8338b873c7ca7d42f43567..39ea7c88a3b5fe84ff5cb77280b4567e7b6d69f9 100644 (file)
@@ -2448,6 +2448,16 @@ tilepro-*-linux*)
        c_target_objs="tilepro-c.o"
        cxx_target_objs="tilepro-c.o"
        ;;
+v850-*-rtems*)
+       target_cpu_default="TARGET_CPU_generic"
+       tm_file="dbxelf.h elfos.h v850/v850.h"
+       tm_file="${tm_file} rtems.h v850/rtems.h newlib-stdint.h"
+       tmake_file="${tmake_file} v850/t-v850"
+       tmake_file="${tmake_file} t-rtems v850/t-rtems"
+       use_collect2=no
+       c_target_objs="v850-c.o"
+       cxx_target_objs="v850-c.o"
+       ;;
 v850*-*-*)
        case ${target} in
        v850e2v3-*-*)
diff --git a/gcc/config/v850/rtems.h b/gcc/config/v850/rtems.h
new file mode 100644 (file)
index 0000000..397d2e0
--- /dev/null
@@ -0,0 +1,29 @@
+/* Definitions for rtems targeting a v850 using ELF.
+   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/>.  */
+
+/* Specify predefined symbols in preprocessor.  */
+
+#define TARGET_OS_CPP_BUILTINS() do {          \
+  builtin_define( "__rtems__" );               \
+  builtin_assert( "system=rtems" );            \
+} while (0)
+
+/* Map mv850e1 and mv850es to mv850e to match MULTILIB_MATCHES */
+#undef ASM_SPEC
+#define ASM_SPEC "%{mv850es:-mv850e} %{mv850e1:-mv850e} %{!mv850es:%{!mv850e1:%{mv*:-mv%*}}}"
diff --git a/gcc/config/v850/t-rtems b/gcc/config/v850/t-rtems
new file mode 100644 (file)
index 0000000..c3f4ee4
--- /dev/null
@@ -0,0 +1,3 @@
+# Custom multilibs for RTEMS
+
+MULTILIB_MATCHES  += mv850e=mv850es