diff mbox

Add microblaze*-rtems*

Message ID 50894381.8060400@rtems.org
State New
Headers show

Commit Message

Ralf Corsepius Oct. 25, 2012, 1:49 p.m. UTC
Hi,

And another RTEMS-patch, I'd like to apply to GCC trunk and 
GCC-4_7-branch: Adding microblaze*-rtems* target.

This patch has been in use as part of the RTEMS gcc-4.7 patches for ca. 
1/2 a year.

Ralf

Comments

Michael Eager Oct. 25, 2012, 2:38 p.m. UTC | #1
On 10/25/2012 06:49 AM, Ralf Corsepius wrote:
> Hi,
>
> And another RTEMS-patch, I'd like to apply to GCC trunk and GCC-4_7-branch: Adding
> microblaze*-rtems* target.
>
> This patch has been in use as part of the RTEMS gcc-4.7 patches for ca. 1/2 a year.

OK to apply.
Ralf Corsepius Oct. 25, 2012, 4:48 p.m. UTC | #2
On 10/25/2012 04:38 PM, Michael Eager wrote:
> On 10/25/2012 06:49 AM, Ralf Corsepius wrote:
>> Hi,
>>
>> And another RTEMS-patch, I'd like to apply to GCC trunk and
>> GCC-4_7-branch: Adding
>> microblaze*-rtems* target.
>>
>> This patch has been in use as part of the RTEMS gcc-4.7 patches for
>> ca. 1/2 a year.
>
> OK to apply.

Thanks, patches applied to trunk and gcc-4.7-branch.

Ralf
diff mbox

Patch

2012-04-19	Ralf Corsépius <ralf.corsepius@rtems.org>

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

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 13da8a3..317cb95 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1728,6 +1728,14 @@  microblaze*-linux*)
 	c_target_objs="${c_target_objs} microblaze-c.o"
 	cxx_target_objs="${cxx_target_objs} microblaze-c.o"
 	;;
+microblaze*-*-rtems*)
+	tm_file="${tm_file} dbxelf.h"
+	tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
+	c_target_objs="${c_target_objs} microblaze-c.o"
+	cxx_target_objs="${cxx_target_objs} microblaze-c.o"
+	tmake_file="${tmake_file} microblaze/t-microblaze"
+	tmake_file="${tmake_file} t-rtems microblaze/t-rtems"
+        ;;
 microblaze*-*-*)
         tm_file="${tm_file} dbxelf.h"
 	c_target_objs="${c_target_objs} microblaze-c.o"
diff --git a/gcc/config/microblaze/rtems.h b/gcc/config/microblaze/rtems.h
new file mode 100644
index 0000000..fecf7a2
--- /dev/null
+++ b/gcc/config/microblaze/rtems.h
@@ -0,0 +1,25 @@ 
+/* Definitions for rtems targeting a microblaze 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)
diff --git a/gcc/config/microblaze/t-rtems b/gcc/config/microblaze/t-rtems
new file mode 100644
index 0000000..d0c3826
--- /dev/null
+++ b/gcc/config/microblaze/t-rtems
@@ -0,0 +1 @@ 
+# Custom multilibs for RTEMS