Resubmitting this, gcc 4.9 builds with this on armv7. All regression tests fail though. As already stated I successfuly build gcc on i386 and amd64 with this patch.
Index: Makefile =================================================================== RCS file: /cvs/ports/lang/gcc/4.9/Makefile,v retrieving revision 1.54 diff -u -p -r1.54 Makefile --- Makefile 15 Mar 2018 01:16:42 -0000 1.54 +++ Makefile 6 Apr 2018 13:13:10 -0000 @@ -4,7 +4,7 @@ ONLY_FOR_ARCHS = ${GCC49_ARCHS} DPB_PROPERTIES = parallel V = 4.9.4 -REVISION = 8 +REVISION = 9 FULL_VERSION = $V FULL_PKGVERSION = $V Index: patches/patch-gcc_configure =================================================================== RCS file: /cvs/ports/lang/gcc/4.9/patches/patch-gcc_configure,v retrieving revision 1.5 diff -u -p -r1.5 patch-gcc_configure --- patches/patch-gcc_configure 1 Sep 2016 17:30:33 -0000 1.5 +++ patches/patch-gcc_configure 6 Apr 2018 13:13:10 -0000 @@ -1,7 +1,20 @@ $OpenBSD: patch-gcc_configure,v 1.5 2016/09/01 17:30:33 pascal Exp $ ---- gcc/configure.orig Sun May 22 10:53:32 2016 -+++ gcc/configure Sat Aug 6 19:19:05 2016 -@@ -17367,7 +17367,7 @@ openbsd*) +Index: gcc/configure +--- gcc/configure.orig ++++ gcc/configure +@@ -6597,6 +6597,11 @@ $as_echo "$ac_res" >&6; } + fi + done + CFLAGS="$save_CFLAGS" ++if [[ `uname -m` == armv7 ]] ; then ++ if $CC --version 2>&1 | grep clang; then ++ noexception_flags="$noexception_flags -fbracket-depth=512" ++ fi ++fi + + + # Enable expensive internal checks +@@ -17367,7 +17372,7 @@ openbsd*) *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' @@ -10,7 +23,7 @@ $OpenBSD: patch-gcc_configure,v 1.5 2016 shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in -@@ -21027,7 +21027,7 @@ openbsd*) +@@ -21027,7 +21032,7 @@ openbsd*) *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' @@ -19,7 +32,7 @@ $OpenBSD: patch-gcc_configure,v 1.5 2016 shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in -@@ -27522,6 +27522,7 @@ else +@@ -27522,6 +27527,7 @@ else fi ;; Index: patches/patch-gcc_system_h =================================================================== RCS file: patches/patch-gcc_system_h diff -N patches/patch-gcc_system_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-gcc_system_h 6 Apr 2018 13:13:10 -0000 @@ -0,0 +1,13 @@ +$OpenBSD$ + +Index: gcc/system.h +--- gcc/system.h.orig ++++ gcc/system.h +@@ -231,6 +231,7 @@ extern int errno; + file uses a standard library header that includes <cstdlib>, we will get + an error about 'using std::malloc'. */ + #ifdef __cplusplus ++#include <new> + #include <cstdlib> + #endif +