aboutsummaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@eecs.berkeley.edu>2014-09-06 22:50:05 -0700
committerAndrew Waterman <waterman@eecs.berkeley.edu>2014-09-07 22:20:13 -0700
commitb6fc8167da4cb089936ed222f8addb73afcaa11c (patch)
tree44311bdb3341144be6be287ca433af6e6b1b5018 /patches
downloadriscv-gnu-toolchain-b6fc8167da4cb089936ed222f8addb73afcaa11c.zip
riscv-gnu-toolchain-b6fc8167da4cb089936ed222f8addb73afcaa11c.tar.gz
riscv-gnu-toolchain-b6fc8167da4cb089936ed222f8addb73afcaa11c.tar.bz2
gcc: initial gcc 4.9.1 port
Diffstat (limited to 'patches')
-rw-r--r--patches/gcc92
1 files changed, 92 insertions, 0 deletions
diff --git a/patches/gcc b/patches/gcc
new file mode 100644
index 0000000..e34c67f
--- /dev/null
+++ b/patches/gcc
@@ -0,0 +1,92 @@
+--- original-gcc/config.sub
++++ gcc/config.sub
+@@ -334,6 +334,9 @@ case $basic_machine in
+ ms1)
+ basic_machine=mt-unknown
+ ;;
++ riscv)
++ basic_machine=riscv-ucb
++ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+--- original-gcc/gcc/config.gcc
++++ gcc/gcc/config.gcc
+@@ -1944,6 +1944,18 @@ microblaze*-*-elf)
+ cxx_target_objs="${cxx_target_objs} microblaze-c.o"
+ tmake_file="${tmake_file} microblaze/t-microblaze"
+ ;;
++riscv*-*-linux*) # Linux RISC-V
++ tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} riscv/linux.h riscv/linux64.h"
++ tmake_file="${tmake_file} riscv/t-linux64"
++ gnu_ld=yes
++ gas=yes
++ ;;
++riscv*-*-elf*) # Linux RISC-V
++ tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h"
++ tmake_file="${tmake_file} riscv/t-elf"
++ gnu_ld=yes
++ gas=yes
++ ;;
+ mips*-*-netbsd*) # NetBSD/mips, either endian.
+ target_cpu_default="MASK_ABICALLS"
+ tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
+@@ -3750,6 +3762,31 @@ case "${target}" in
+ done
+ ;;
+
++ riscv*-*-*)
++ supported_defaults="abi arch arch_32 arch_64 float tune tune_32 tune_64"
++
++ case ${with_float} in
++ "" | soft | hard)
++ # OK
++ ;;
++ *)
++ echo "Unknown floating point type used in --with-float=$with_float" 1>&2
++ exit 1
++ ;;
++ esac
++
++ case ${with_abi} in
++ "" | 32 | 64)
++ # OK
++ ;;
++ *)
++ echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
++ exit 1
++ ;;
++ esac
++
++ ;;
++
+ mips*-*-*)
+ supported_defaults="abi arch arch_32 arch_64 float fpu nan tune tune_32 tune_64 divide llsc mips-plt synci"
+
+--- original-gcc/libatomic/configure.tgt
++++ gcc/libatomic/configure.tgt
+@@ -29,6 +29,7 @@
+ case "${target_cpu}" in
+ alpha*) ARCH=alpha ;;
+ rs6000 | powerpc*) ARCH=powerpc ;;
++ riscv*) ARCH=riscv ;;
+ sh*) ARCH=sh ;;
+
+ arm*)
+--- original-gcc/libgcc/config.host
++++ gcc/libgcc/config.host
+@@ -1002,6 +1002,14 @@ powerpcle-*-eabi*)
+ tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
+ extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
+ ;;
++riscv*-*-linux*)
++ tmake_file="${tmake_file} riscv/t-fpbit riscv/t-dpbit riscv/t-tpbit riscv/t-linux"
++ extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o crtendS.o crtbeginT.o"
++ ;;
++riscv*-*-*)
++ tmake_file="${tmake_file} riscv/t-fpbit riscv/t-dpbit riscv/t-elf"
++ extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
++ ;;
+ rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
+ md_unwind_header=rs6000/aix-unwind.h
+ tmake_file="t-fdpbit rs6000/t-ppc64-fp rs6000/t-slibgcc-aix rs6000/t-ibm-ldouble"