From 976f4f9e4770a567550e8b9a9f2fc531206cebba Mon Sep 17 00:00:00 2001 From: Yang Yujie Date: Fri, 30 Jun 2023 17:07:59 +0800 Subject: LoongArch: support loongarch*-elf target gcc/ChangeLog: * config.gcc: add loongarch*-elf target. * config/loongarch/elf.h: New file. Link against newlib by default. libgcc/ChangeLog: * config.host: add loongarch*-elf target. --- libgcc/config.host | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libgcc') diff --git a/libgcc/config.host b/libgcc/config.host index c94d69d..6a112a0 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -136,7 +136,7 @@ hppa*-*-*) lm32*-*-*) cpu_type=lm32 ;; -loongarch*-*-*) +loongarch*-*) cpu_type=loongarch tmake_file="loongarch/t-loongarch" if test "${libgcc_cv_loongarch_hard_float}" = yes; then @@ -944,7 +944,7 @@ lm32-*-uclinux*) extra_parts="$extra_parts crtbegin.o crtendS.o crtbeginT.o" tmake_file="lm32/t-lm32 lm32/t-uclinux t-libgcc-pic t-softfp-sfdf t-softfp" ;; -loongarch*-*-linux*) +loongarch*-linux*) extra_parts="$extra_parts crtfastmath.o" tmake_file="${tmake_file} t-crtfm loongarch/t-crtstuff" case ${host} in @@ -954,6 +954,11 @@ loongarch*-*-linux*) esac md_unwind_header=loongarch/linux-unwind.h ;; +loongarch*-elf*) + extra_parts="$extra_parts crtfastmath.o" + tmake_file="${tmake_file} t-crtfm loongarch/t-crtstuff" + tmake_file="${tmake_file} t-slibgcc-libgcc" + ;; m32r-*-elf*) tmake_file="$tmake_file m32r/t-m32r t-fdpbit" extra_parts="$extra_parts crtinit.o crtfini.o" -- cgit v1.1