summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsh <sh@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-28 06:06:37 +0000
committersh <sh@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-28 06:06:37 +0000
commiteef09bf1941fb3933e570763d2a1038f7bfc84ba (patch)
tree36f550d01d7f91e14aa9833080497e10dfc9e394
parent1b6610971d1d35b47e2a94848da80c3fc302c687 (diff)
downloadgcc-eef09bf1941fb3933e570763d2a1038f7bfc84ba.tar.gz
[RISC-V] Add RTEMS support
gcc/ * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*). * config/riscv/rtems.h: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@250649 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config.gcc7
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ceb93e526e5..c1fee1bf2bb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2017-07-28 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ Backport from mainline
+ 2017-07-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
+ * config/riscv/rtems.h: New file.
+
2017-07-27 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 3fe327be6c1..4c1e83bfde3 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2031,7 +2031,7 @@ riscv*-*-linux*)
# automatically detect that GAS supports it, yet we require it.
gcc_cv_initfini_array=yes
;;
-riscv*-*-elf*)
+riscv*-*-elf* | riscv*-*-rtems*)
tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h"
case "x${enable_multilib}" in
xno) ;;
@@ -2044,6 +2044,11 @@ riscv*-*-elf*)
# Force .init_array support. The configure script cannot always
# automatically detect that GAS supports it, yet we require it.
gcc_cv_initfini_array=yes
+ case ${target} in
+ riscv*-*-rtems*)
+ tm_file="${tm_file} rtems.h riscv/rtems.h"
+ ;;
+ esac
;;
mips*-*-netbsd*) # NetBSD/mips, either endian.
target_cpu_default="MASK_ABICALLS"