I tried to build gcc with your patch and ran into the error below. I did not see any patches applied to ipa-devirt.c
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/ipa-devirt.c:1637:32: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] fprintf (f, " at offset "HOST_WIDE_INT_PRINT_DEC"\n", ^ 5 warnings and 1 error generated. gmake[3]: *** [Makefile:1058: ipa-devirt.o] Error 1 gmake[3]: Leaving directory '/usr/ports/pobj/gcc-4.9.4/build-arm/gcc' gmake[2]: *** [Makefile:4217: all-stage1-gcc] Error 2 gmake[2]: Leaving directory '/usr/ports/pobj/gcc-4.9.4/build-arm' gmake[1]: *** [Makefile:17735: stage1-bubble] Error 2 gmake[1]: Leaving directory '/usr/ports/pobj/gcc-4.9.4/build-arm' gmake: *** [Makefile:17872: bootstrap2] Error 2 *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2742 '/usr/ports/pobj/gcc-4.9.4/build-arm/.build_done') *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1938 '/usr/ports/packages/arm/all/gcc-4.9.4p9.tgz') *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2440 '_internal-package') *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2419 'package') *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1956 '/var/db/pkg/gcc-4.9.4p9/+CONTENTS') *** Error 1 in /usr/ports/lang/gcc/4.9 (/usr/ports/infrastructure/mk/bsd.port.mk:2419 'install') -----Original Message----- From: owner-po...@openbsd.org <owner-po...@openbsd.org> On Behalf Of Markus Hennecke Sent: April 15, 2018 9:04 AM To: ports@openbsd.org Subject: Re: [armv7 fix] Fix build lang/gcc/4.9 Attached is a new diff fixing build on armv7 and adding patches to fix the build after the switch to clang 6. The patch became pretty big, because clang complains about error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] in a lot of files. No change in the armv7 fixes, still setting -fbracket-depth=512 in case CC is clang and adding #include <new> in gcc/system.h when compiling c++.