$OpenBSD: patch-libgcc_config_host,v 1.3 2016/12/28 21:48:21 pascal Exp $
--- libgcc/config.host.orig	Sat Nov 19 04:03:55 2016
+++ libgcc/config.host	Fri Dec 23 18:25:24 2016
@@ -386,6 +386,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"
@@ -854,6 +859,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"
@@ -1010,6 +1021,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"
@@ -1182,6 +1196,8 @@ sh-wrs-vxworks)
 	tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
 	;;
 sparc-*-netbsdelf*)
+	;;
+sparc-*-openbsd*)
 	;;
 sparc64-*-openbsd*)
 	;;
