diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-06-15 05:19:44 +0000 |
---|---|---|
committer | Sebastian Huber <sh@gcc.gnu.org> | 2018-06-15 05:19:44 +0000 |
commit | a8ef8061e1ccbacff39065df65b5c17fbd01805a (patch) | |
tree | 0f0f220f70d0ba1b58a42e2b841a35879be87184 /gcc/config.gcc | |
parent | cb4f9a8c05fd36d78faaddb4635b4bfb80bba457 (diff) | |
download | gcc-a8ef8061e1ccbacff39065df65b5c17fbd01805a.zip gcc-a8ef8061e1ccbacff39065df65b5c17fbd01805a.tar.gz gcc-a8ef8061e1ccbacff39065df65b5c17fbd01805a.tar.bz2 |
RISC-V: Add custom RTEMS multilibs
Add multilib variants for -march=rv64imafd, e.g. to support the BOOMv2 core.
Add -mcmodel=medany as a variant of the 64-bit multilibs for RTEMS. The
rationale for this change is that several existing RISC-V chips map the
RAM at 0x80000000. In RTEMS, we do not use virtual memory, so
applications will run at this location which is outside the +-2GiB range
in a 64-bit configuration.
gcc/
* config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
multilibs for *-*-rtems*.
* config/riscv/t-rtems: New file.
From-SVN: r261619
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 2f17eb0..ef67c88 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2080,10 +2080,17 @@ riscv*-*-linux*) ;; riscv*-*-elf* | riscv*-*-rtems*) tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h" - case "x${enable_multilib}" in - xno) ;; - xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;; - *) echo "Unknown value for enable_multilib"; exit 1 + case ${target} in + *-*-rtems*) + tm_file="${tm_file} rtems.h riscv/rtems.h" + tmake_file="${tmake_file} riscv/t-rtems" + ;; + *) + case "x${enable_multilib}" in + xno) ;; + xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;; + *) echo "Unknown value for enable_multilib"; exit 1 + esac esac tmake_file="${tmake_file} riscv/t-riscv" gnu_ld=yes @@ -2091,11 +2098,6 @@ riscv*-*-elf* | riscv*-*-rtems*) # 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 ;; riscv*-*-freebsd*) tm_file="${tm_file} elfos.h ${fbsd_tm_file} riscv/freebsd.h" |