Re: [armv7 fix] Fix build lang/gcc/4.9

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [armv7 fix] Fix build lang/gcc/4.9

s_graf
I tried to continue the build of php with the ports snapshot of today and ran into another gcc problem:

/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: remove extraneous parentheses
      around the comparison to silence this warning
(thumb1_code)) == (
               ^
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: use '=' to turn this equality
      comparison into an assignment
(thumb1_code)) == (
               ^~
               =
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: warning: equality comparison with
      extraneous parentheses [-Wparentheses-equality]
(thumb1_code)) == (
~~~~~~~~~~~~~~~^~~~
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: remove extraneous parentheses
      around the comparison to silence this warning
(thumb1_code)) == (
               ^
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: use '=' to turn this equality
      comparison into an assignment
(thumb1_code)) == (
               ^~
               =
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: warning: equality comparison with
      extraneous parentheses [-Wparentheses-equality]
(thumb1_code)) == (
~~~~~~~~~~~~~~~^~~~
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: remove extraneous parentheses
      around the comparison to silence this warning
(thumb1_code)) == (
               ^
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: use '=' to turn this equality
      comparison into an assignment
(thumb1_code)) == (
               ^~
               =
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: warning: equality comparison with
      extraneous parentheses [-Wparentheses-equality]
(thumb1_code)) == (
~~~~~~~~~~~~~~~^~~~
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: remove extraneous parentheses
      around the comparison to silence this warning
(thumb1_code)) == (
               ^
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: use '=' to turn this equality
      comparison into an assignment
(thumb1_code)) == (
               ^~
               =
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/neon.md:3486:10917: fatal error: bracket nesting
      level exceeded maximum of 256
/usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/neon.md:3486:10917: note: use -fbracket-depth=N to
      increase maximum nesting level
33 warnings and 1 error generated.
gmake[3]: *** [Makefile:1058: insn-attrtab.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/lang/gcc/4.9 (/usr/ports/infrastructure/mk/bsd.port.mk:2740 '/usr/ports/pobj/gcc-4.9.4/build-arm/.build_done')
*** Error 1 in /usr/ports/lang/gcc/4.9 (/usr/ports/infrastructure/mk/bsd.port.mk:1938 '/usr/ports/packages/arm/all/gcc-4.9.4p8.tgz')
*** Error 1 in /usr/ports/lang/gcc/4.9 (/usr/ports/infrastructure/mk/bsd.port.mk:2438 '_internal-package')
*** Error 1 in /usr/ports/lang/gcc/4.9 (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'package')
*** Error 1 in /usr/ports/lang/gcc/4.9 (/usr/ports/infrastructure/mk/bsd.port.mk:1956 '/var/db/pkg/gcc-4.9.4p8/+CONTENTS')
*** Error 1 in /usr/ports/lang/gcc/4.9 (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'install')
*** Error 1 in /usr/ports/devel/libuv (/usr/ports/infrastructure/mk/bsd.port.mk:2073 '/usr/ports/pobj/libuv-1.19.1/.dep-STEM-ge-4.9,lt-4.10-lang-gcc-4.9')
*** Error 1 in /usr/ports/devel/libuv (/usr/ports/infrastructure/mk/bsd.port.mk:2506 '/usr/ports/pobj/libuv-1.19.1/.extract_done')
*** Error 1 in /usr/ports/devel/libuv (/usr/ports/infrastructure/mk/bsd.port.mk:1938 '/usr/ports/packages/arm/all/libuv-1.19.1.tgz')
*** Error 1 in /usr/ports/devel/libuv (/usr/ports/infrastructure/mk/bsd.port.mk:2438 '_internal-package')
*** Error 1 in /usr/ports/devel/libuv (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'package')
*** Error 1 in /usr/ports/devel/libuv (/usr/ports/infrastructure/mk/bsd.port.mk:1956 '/var/db/pkg/libuv-1.19.1/+CONTENTS')
*** Error 1 in /usr/ports/devel/libuv (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'install')
*** Error 1 in /usr/ports/devel/cmake (/usr/ports/infrastructure/mk/bsd.port.mk:2073 '/usr/ports/pobj/cmake-3.10.2/.dep-devel-libuv')
*** Error 1 in /usr/ports/devel/cmake (/usr/ports/infrastructure/mk/bsd.port.mk:2506 '/usr/ports/pobj/cmake-3.10.2/.extract_done')
*** Error 1 in /usr/ports/devel/cmake (/usr/ports/infrastructure/mk/bsd.port.mk:1938 '/usr/ports/packages/arm/all/cmake-3.10.2.tgz')
*** Error 1 in /usr/ports/devel/cmake (/usr/ports/infrastructure/mk/bsd.port.mk:2438 '_internal-package')
*** Error 1 in /usr/ports/devel/cmake (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'package')
*** Error 1 in /usr/ports/devel/cmake (/usr/ports/infrastructure/mk/bsd.port.mk:1956 '/var/db/pkg/cmake-3.10.2/+CONTENTS')
*** Error 1 in /usr/ports/devel/cmake (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'install')
*** Error 1 in /usr/ports/archivers/brotli (/usr/ports/infrastructure/mk/bsd.port.mk:2073 '/usr/ports/pobj/brotli-1.0.2/.dep-devel-cmake')
*** Error 1 in /usr/ports/archivers/brotli (/usr/ports/infrastructure/mk/bsd.port.mk:2506 '/usr/ports/pobj/brotli-1.0.2/.extract_done')
*** Error 1 in /usr/ports/archivers/brotli (/usr/ports/infrastructure/mk/bsd.port.mk:1938 '/usr/ports/packages/arm/all/brotli-1.0.2.tgz')
*** Error 1 in /usr/ports/archivers/brotli (/usr/ports/infrastructure/mk/bsd.port.mk:2438 '_internal-package')
*** Error 1 in /usr/ports/archivers/brotli (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'package')
*** Error 1 in /usr/ports/archivers/brotli (/usr/ports/infrastructure/mk/bsd.port.mk:1956 '/var/db/pkg/brotli-1.0.2/+CONTENTS')
*** Error 1 in /usr/ports/archivers/brotli (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'install')
*** Error 1 in /usr/ports/www/apache-httpd (/usr/ports/infrastructure/mk/bsd.port.mk:2073 '/usr/ports/pobj/apache-httpd-2.4.33/.dep-archivers-brotli')
*** Error 1 in /usr/ports/www/apache-httpd (/usr/ports/infrastructure/mk/bsd.port.mk:2506 '/usr/ports/pobj/apache-httpd-2.4.33/.extract_done')
*** Error 1 in /usr/ports/www/apache-httpd (/usr/ports/infrastructure/mk/bsd.port.mk:1938 '/usr/ports/packages/arm/all/apache-httpd-2.4.33.tgz')
*** Error 1 in /usr/ports/www/apache-httpd (/usr/ports/infrastructure/mk/bsd.port.mk:2438 '_internal-package')
*** Error 1 in /usr/ports/www/apache-httpd (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'package')
*** Error 1 in /usr/ports/www/apache-httpd (/usr/ports/infrastructure/mk/bsd.port.mk:1956 '/var/db/pkg/apache-httpd-2.4.33/+CONTENTS')
*** Error 1 in /usr/ports/www/apache-httpd (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'install')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2073 '/usr/ports/pobj/php-7.0.28/.dep-www-apache-httpd')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2506 '/usr/ports/pobj/php-7.0.28/.extract_done')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1938 '/usr/ports/packages/arm/all/php-7.0.28.tgz')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2438 '_internal-package')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'package')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1956 '/var/db/pkg/php-7.0.28/+CONTENTS')
*** Error 1 in /usr/ports/lang/php/7.0 (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'install')



-----Original Message-----
From: [hidden email] <[hidden email]> On Behalf Of Jeremie Courreges-Anglas
Sent: April 15, 2018 4:48 PM
To: [hidden email]
Cc: 'Markus Hennecke' <[hidden email]>; [hidden email]; Pascal Stumpf <[hidden email]>
Subject: Re: [armv7 fix] Fix build lang/gcc/4.9


+cc maintainer

> -----Original Message-----
> From: [hidden email] <[hidden email]> On Behalf Of
> Markus Hennecke
> Sent: April 15, 2018 9:04 AM
> To: [hidden email]
> 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, <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

Re: [armv7 fix] Fix build lang/gcc/4.9

Jeremie Courreges-Anglas-2
On Mon, Apr 16 2018, <[hidden email]> wrote:
> I tried to continue the build of php with the ports snapshot of today and ran into another gcc problem:

[...]

> /usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: warning: equality comparison with
>       extraneous parentheses [-Wparentheses-equality]
> (thumb1_code)) == (
> ~~~~~~~~~~~~~~~^~~~
> /usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: remove extraneous parentheses
>       around the comparison to silence this warning
> (thumb1_code)) == (
>                ^
> /usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: use '=' to turn this equality
>       comparison into an assignment
> (thumb1_code)) == (
>                ^~
>                =
> /usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/neon.md:3486:10917: fatal error: bracket nesting
>       level exceeded maximum of 256
> /usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/neon.md:3486:10917: note: use -fbracket-depth=N to
>       increase maximum nesting level
> 33 warnings and 1 error generated.
> gmake[3]: *** [Makefile:1058: insn-attrtab.o] Error 1

Well this seems to be handled by the diff in my previous mail, attached
again for convenience.  gcc (FLAVOR='no_java no_ada') packages, install,
and seems to run.  dpb ongoing.

Technically a clang-specific fix but it already happened with clang-5.0.


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

Reply | Threaded
Open this post in threaded view
|

Re: [armv7 fix] Fix build lang/gcc/4.9

Jeremie Courreges-Anglas-2
On Tue, Apr 17 2018, Pascal Stumpf <[hidden email]> wrote:

> On Mon, 16 Apr 2018 23:14:53 +0200, Jeremie Courreges-Anglas wrote:
>> On Mon, Apr 16 2018, <[hidden email]> wrote:
>> > I tried to continue the build of php with the ports snapshot of today and ran into another gcc problem:
>>
>> [...]
>>
>> > /usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: warning: equality comparison with
>> >       extraneous parentheses [-Wparentheses-equality]
>> > (thumb1_code)) == (
>> > ~~~~~~~~~~~~~~~^~~~
>> > /usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: remove extraneous parentheses
>> >       around the comparison to silence this warning
>> > (thumb1_code)) == (
>> >                ^
>> > /usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/arm.md:97:16: note: use '=' to turn this equality
>> >       comparison into an assignment
>> > (thumb1_code)) == (
>> >                ^~
>> >                =
>> > /usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/neon.md:3486:10917: fatal error: bracket nesting
>> >       level exceeded maximum of 256
>> > /usr/ports/pobj/gcc-4.9.4/gcc-4.9.4/gcc/config/arm/neon.md:3486:10917: note: use -fbracket-depth=N to
>> >       increase maximum nesting level
>> > 33 warnings and 1 error generated.
>> > gmake[3]: *** [Makefile:1058: insn-attrtab.o] Error 1
>>
>> Well this seems to be handled by the diff in my previous mail, attached
>> again for convenience.  gcc (FLAVOR='no_java no_ada') packages, install,
>> and seems to run.  dpb ongoing.
>>
>> Technically a clang-specific fix but it already happened with clang-5.0.
>
> This may be a better approach; after all, we need the flag for only one
> file.

OTOH if a single file is affected, -fbracket-depth=n shouldn't have
side-effects on other files...

> Currently testing on armv7, will have results by tomorrow.
>
> The real fix would be to test for the flag in configure, of course.

Yeah, or maybe clang should cope better with such files.  Anyway, even
if we can probably remove gcc-4.9 from the dependency chain of a few
more ports on arm, it would be nice to have gcc-4.9 fixed. :)

If your patch is sufficient. If not, please consider using Markus'
patch.  ok jca@

> Index: patches/patch-gcc_Makefile_in
> ===================================================================
> RCS file: /cvs/ports/lang/gcc/4.9/patches/patch-gcc_Makefile_in,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-gcc_Makefile_in
> --- patches/patch-gcc_Makefile_in 10 Feb 2015 22:04:54 -0000 1.1
> +++ patches/patch-gcc_Makefile_in 17 Apr 2018 14:57:22 -0000
> @@ -2,9 +2,23 @@ $OpenBSD: patch-gcc_Makefile_in,v 1.1 20
>  
>  Disable fixincludes madness
>  
> ---- gcc/Makefile.in.orig Tue Feb  3 17:16:24 2015
> -+++ gcc/Makefile.in Tue Feb  3 17:17:57 2015
> -@@ -2730,7 +2730,7 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \
> +Index: gcc/Makefile.in
> +--- gcc/Makefile.in.orig
> ++++ gcc/Makefile.in
> +@@ -1944,6 +1944,12 @@ DRIVER_DEFINES = \
> +
> + CFLAGS-gcc.o += $(DRIVER_DEFINES)
> +
> ++ISCLANG = $(shell $CC --version | grep -c clang)
> ++
> ++ifeq ($(ISCLANG),1)
> ++CFLAGS-insn-attrtab.o += -fbracket-depth=512
> ++endif
> ++
> + specs.h : s-specs ; @true
> + s-specs : Makefile
> + lsf="$(lang_specs_files)"; for f in $$lsf; do \
> +@@ -2730,7 +2736,7 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \
>        gcc_dir=`${PWD_COMMAND}` ; \
>        export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
>        cd $(build_objdir)/fixincludes && \
>

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: [armv7 fix] Fix build lang/gcc/4.9

Markus Hennecke
On Mon, 30 Apr 2018, Pascal Stumpf wrote:
> Haven't managed to get my version working properly yet.  So OK for
> Markus' patch.

There is already a working version of your patch in the tree:
https://marc.info/?l=openbsd-ports&m=152493359410874&w=2