$OpenBSD: patch-libgcc_config_host,v 1.4 2017/07/19 09:23:16 pascal Exp $
Index: libgcc/config.host
--- libgcc/config.host.orig
+++ libgcc/config.host
@@ -391,6 +391,11 @@ arm*-*-freebsd*)                # ARM FreeBSD EABI
 arm*-*-netbsdelf*)
 	tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover"
 	;;
+arm-*-openbsd*)
+	tmake_file="$tmake_file arm/t-arm arm/t-elf arm/t-bpabi arm/t-openbsd"
+	tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
+	unwind_header=config/arm/unwind-arm.h
+	;;
 arm*-*-linux*)			# ARM GNU/Linux with ELF
 	tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm"
 	tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
@@ -859,6 +864,12 @@ microblaze*-*-rtems*)
 	;;
 mips*-*-netbsd*)			# NetBSD/mips, either endian.
 	;;
+mips64-*-openbsd*)
+       set
+       ;;
+mips64el-*-openbsd*)
+       set
+       ;;
 mips*-*-linux*)				# Linux MIPS, either endian.
 	extra_parts="$extra_parts crtfastmath.o"
 	tmake_file="${tmake_file} t-crtfm"
@@ -1015,6 +1026,9 @@ powerpc*-*-freebsd*)
 powerpc-*-netbsd*)
 	tmake_file="$tmake_file rs6000/t-netbsd rs6000/t-crtstuff"
 	;;
+powerpc-*-openbsd*)
+	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff"
+	;;
 powerpc-*-eabispe*)
 	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr 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"
@@ -1187,6 +1201,8 @@ sh-wrs-vxworks)
 	tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
 	;;
 sparc-*-netbsdelf*)
+	;;
+sparc-*-openbsd*)
 	;;
 sparc64-*-openbsd*)
 	;;
