diff options
author | Stafford Horne <shorne@gmail.com> | 2018-11-09 12:16:14 +0000 |
---|---|---|
committer | Stafford Horne <shorne@gcc.gnu.org> | 2018-11-09 12:16:14 +0000 |
commit | 3965b35f341cc99a10876518f707740a9e912a01 (patch) | |
tree | 2233000c45797cf07e84d8e3ed4b4f37aa16ace3 /gcc/config.gcc | |
parent | 1d6ff15057c18d72b231f60e526273b41e362283 (diff) | |
download | gcc-3965b35f341cc99a10876518f707740a9e912a01.zip gcc-3965b35f341cc99a10876518f707740a9e912a01.tar.gz gcc-3965b35f341cc99a10876518f707740a9e912a01.tar.bz2 |
or1k: gcc: initial support for openrisc
2018-11-09 Stafford Horne <shorne@gmail.com>
Richard Henderson <rth@twiddle.net>
Joel Sherrill <joel@rtems.org>
* common/config/or1k/or1k-common.c: New file.
* config/or1k/*: New.
* config.gcc (or1k*-*-*): New.
* configure.ac (or1k*-*-*): New test for openrisc tls.
* configure: Regenerated.
* doc/install.texi: Document OpenRISC triplets.
* doc/invoke.texi: Document OpenRISC arguments.
* doc/md.texi: Document OpenRISC.
Co-Authored-By: Joel Sherrill <joel@rtems.org>
Co-Authored-By: Richard Henderson <rth@twiddle.net>
From-SVN: r265963
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 7578ff0..e2b9946 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -484,6 +484,9 @@ nios2-*-*) nvptx-*-*) cpu_type=nvptx ;; +or1k*-*-*) + cpu_type=or1k + ;; powerpc*-*-*spe*) cpu_type=powerpcspe extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h" @@ -2490,6 +2493,48 @@ nvptx-*) tm_file="${tm_file} nvptx/offload.h" fi ;; +or1k*-*-*) + tm_file="elfos.h ${tm_file}" + tmake_file="${tmake_file} or1k/t-or1k" + # Force .init_array support. The configure script cannot always + # automatically detect that GAS supports it, yet we require it. + gcc_cv_initfini_array=yes + + # Handle --with-multilib-list=... + or1k_multilibs="${with_multilib_list}" + if test "$or1k_multilibs" = "default"; then + or1k_multilibs="mcmov,msoft-mul,msoft-div" + fi + or1k_multilibs=`echo $or1k_multilibs | sed -e 's/,/ /g'` + for or1k_multilib in ${or1k_multilibs}; do + case ${or1k_multilib} in + mcmov | msext | msfimm | \ + mhard-div | mhard-mul | \ + msoft-div | msoft-mul ) + TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${or1k_multilib}" + ;; + *) + echo "--with-multilib-list=${with_multilib_list} not supported." + exit 1 + esac + done + TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` + + case ${target} in + or1k*-*-linux*) + tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h" + tm_file="${tm_file} or1k/linux.h" + ;; + or1k*-*-elf*) + tm_file="${tm_file} newlib-stdint.h or1k/elf.h" + extra_options="${extra_options} or1k/elf.opt" + ;; + or1k*-*-rtems*) + tm_file="${tm_file} newlib-stdint.h or1k/rtems.h rtems.h" + tmake_file="${tmake_file} or1k/t-rtems" + ;; + esac + ;; pdp11-*-*) tm_file="${tm_file} newlib-stdint.h" use_gcc_stdint=wrap |