Skip to content

Commit

Permalink
epiphany: Add support to build for RTEMS targets
Browse files Browse the repository at this point in the history
gcc/ChangeLog:
	* config.gcc: Add Epiphany RTEMS target.
	* config/epiphany/rtems.h: New file.

libgcc/ChangeLog:
	* config.host: Add Epiphany RTEMS target.
  • Loading branch information
heshamelmatary authored and olajep committed Mar 9, 2015
1 parent 487fd8d commit 30f4c63
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 2 deletions.
5 changes: 5 additions & 0 deletions gcc/ChangeLog
@@ -1,3 +1,8 @@
2015-02-24 Hesham ALMatary <heshamelmatary@gmail.com>

* config.gcc: Add Epiphany RTEMS target.
* config/epiphany/rtems.h: New file.

2014-04-11 Tobias Burnus <burnus@net-b.de>

PR other/59055
Expand Down
7 changes: 6 additions & 1 deletion gcc/config.gcc
Expand Up @@ -1141,13 +1141,18 @@ crisv32-*-linux* | cris-*-linux*)
;;
esac
;;
epiphany-*-elf )
epiphany-*-elf | epiphany-*-rtems*)
tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
tmake_file="epiphany/t-epiphany"
extra_options="${extra_options} fused-madd.opt"
extra_objs="$extra_objs mode-switch-use.o resolve-sw-modes.o"
tm_defines="${tm_defines} EPIPHANY_STACK_OFFSET=${with_stack_offset:-8}"
extra_headers="epiphany_intrinsics.h"
case ${target} in
epiphany-*-rtems*)
tm_file="${tm_file} epiphany/rtems.h rtems.h"
;;
esac
;;
fr30-*-elf)
tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
Expand Down
33 changes: 33 additions & 0 deletions gcc/config/epiphany/rtems.h
@@ -0,0 +1,33 @@
/* Definitions for rtems targeting a RTEMS using ELF.
Copyright (C) 2014 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
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/>. */

/* Target OS builtins. */
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__rtems__"); \
builtin_define ("__USE_INIT_FINI__"); \
builtin_assert ("system=rtems"); \
} \
while (0)

/* Use the default */
#undef LINK_GCC_C_SEQUENCE_SPEC
4 changes: 4 additions & 0 deletions libgcc/ChangeLog
@@ -1,3 +1,7 @@
2015-02-24 Hesham ALMatary <heshamelmatary@gmail.com>

* config.host: Add Epiphany RTEMS target.

2014-03-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>

* config.host: Append t-floattodi to tmake_file depending on
Expand Down
2 changes: 1 addition & 1 deletion libgcc/config.host
Expand Up @@ -447,7 +447,7 @@ cris-*-elf)
cris-*-linux* | crisv32-*-linux*)
tmake_file="$tmake_file cris/t-cris t-softfp-sfdf t-softfp cris/t-linux"
;;
epiphany-*-elf*)
epiphany-*-elf* | epiphany-*-rtems*)
tmake_file="epiphany/t-epiphany t-fdpbit epiphany/t-custom-eqsf"
extra_parts="$extra_parts crti.o crtint.o crtrunc.o crtm1reg-r43.o crtm1reg-r63.o crtn.o"
;;
Expand Down

0 comments on commit 30f4c63

Please sign in to comment.