+cc maintainer > -----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++.
On Sun, Apr 15 2018, <s_g...@telus.net> wrote: > 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", Correct, I've spotted this also. I have committed the -Wreserved-user-defined-literal diffs (including the one for ipa-devirt.c) since they are trivial and we need a working ports-gcc for the upcoming hackathon. I'm testing the -fbracket-depth=512 diff on arm, build still ongoing. 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 15 Apr 2018 23:47:01 -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 ;; -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE