public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] Add v850-*-rtems*
@ 2012-07-17 23:14 Ralf Corsepius
  2012-07-18 15:02 ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Corsepius @ 2012-07-17 23:14 UTC (permalink / raw)
  To: gcc-patches; +Cc: Thomas Dörfler, Sebastian Huber, Joel Sherrill

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

Hi,

The patch below adds an v850-*-rtems* target configuration to GCC.
It's a sightly modified copy of the v850*-*-* target, with some RTEMS 
specific changes added.

I would like to apply this patch to trunk and gcc-4_7-branch.

OK to commit?

Ralf

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gcc-v850-rtems.diff --]
[-- Type: text/x-patch; name="gcc-v850-rtems.diff", Size: 2302 bytes --]

2012-06-27  Ralf Corsépius  <ralf.corsepius@rtems.org>

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

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 7768917..39ea7c8 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -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
index 0000000..397d2e0
--- /dev/null
+++ b/gcc/config/v850/rtems.h
@@ -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
index 0000000..c3f4ee4
--- /dev/null
+++ b/gcc/config/v850/t-rtems
@@ -0,0 +1,3 @@
+# Custom multilibs for RTEMS
+
+MULTILIB_MATCHES  += mv850e=mv850es

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] Add v850-*-rtems*
  2012-07-17 23:14 [patch] Add v850-*-rtems* Ralf Corsepius
@ 2012-07-18 15:02 ` Jeff Law
  2012-07-18 15:38   ` Ralf Corsepius
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2012-07-18 15:02 UTC (permalink / raw)
  To: Ralf Corsepius
  Cc: gcc-patches, Thomas Dörfler, Sebastian Huber, Joel Sherrill

On 07/17/12 17:11, Ralf Corsepius wrote:
> Hi,
>
> The patch below adds an v850-*-rtems* target configuration to GCC.
> It's a sightly modified copy of the v850*-*-* target, with some RTEMS
> specific changes added.
>
> I would like to apply this patch to trunk and gcc-4_7-branch.
>
> OK to commit?
Yes.  This is fine.

jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] Add v850-*-rtems*
  2012-07-18 15:02 ` Jeff Law
@ 2012-07-18 15:38   ` Ralf Corsepius
  0 siblings, 0 replies; 3+ messages in thread
From: Ralf Corsepius @ 2012-07-18 15:38 UTC (permalink / raw)
  To: Jeff Law
  Cc: Ralf Corsepius, gcc-patches, Thomas Dörfler,
	Sebastian Huber, Joel Sherrill

On 07/18/2012 05:02 PM, Jeff Law wrote:
> On 07/17/12 17:11, Ralf Corsepius wrote:
>> Hi,
>>
>> The patch below adds an v850-*-rtems* target configuration to GCC.
>> It's a sightly modified copy of the v850*-*-* target, with some RTEMS
>> specific changes added.
>>
>> I would like to apply this patch to trunk and gcc-4_7-branch.
>>
>> OK to commit?
> Yes.  This is fine.

Thanks - Done. Patch is now in trunk and 4_7-branch.

Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-18 15:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 23:14 [patch] Add v850-*-rtems* Ralf Corsepius
2012-07-18 15:02 ` Jeff Law
2012-07-18 15:38   ` Ralf Corsepius

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).