On Wed, Nov 25, 2020 at 11:39:49AM +0100, Charlene Wendling wrote:
> Hi,
>
> > http://build-failures.rhaalovely.net/sparc64/2020-11-17/x11/gnome/gucharmap.log
> (same thing on macppc)
>
> This new version of gucharmap "requires" the -Bsymbolic-functions
> linker flag. Bypassing the check allows to build gucharmap.
>
> I didn't bump REVISION; this changes nothing on amd64 and it has never
> been built on ld.bfd archs.
>
> The runtime is fine on macppc.
>
> Comments/feedback are welcome,
>
> Charl??ne.
>
> [0] https://bin.charlenew.xyz/gucharmap.log
I was looking at this yesterday. I just had not sent the diff out yet.
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/x11/gnome/gucharmap/Makefile,v
retrieving revision 1.128
diff -u -p -u -p -r1.128 Makefile
--- Makefile 8 Nov 2020 07:42:26 -0000 1.128
+++ Makefile 24 Nov 2020 05:26:34 -0000
@@ -33,4 +33,10 @@ LIB_DEPENDS= x11/gtk+3,-main
CONFIGURE_ARGS += -Ducd_path=${LOCALBASE}/share/unicode/ucd/
+.include <bsd.port.arch.mk>
+.if !${PROPERTIES:Mlld}
+# ERROR: Assert failed: -Wl,-Bsymbolic-functions is required but not supported
+CONFIGURE_ARGS += -Dsymbolic_functions=false
+.endif
+
.include <bsd.port.mk>
Index: patches/patch-meson_build
===================================================================
RCS file: /home/cvs/ports/x11/gnome/gucharmap/patches/patch-meson_build,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-meson_build
--- patches/patch-meson_build 7 Nov 2020 08:59:35 -0000 1.1
+++ patches/patch-meson_build 25 Nov 2020 19:27:55 -0000
@@ -1,6 +1,7 @@
$OpenBSD: patch-meson_build,v 1.1 2020/11/07 08:59:35 jasper Exp $
-ERROR: C shared or static library 'dl' not found
+- ERROR: C shared or static library 'dl' not found
+- ERROR: Assert failed: -Wl,-Bsymbolic-functions is required but not supported
Index: meson.build
--- meson.build.orig
@@ -24,3 +25,27 @@ Index: meson.build
# Compiler flags
compiler_flags_common = [
+@@ -221,14 +209,16 @@ add_project_arguments(global_cflags, language: 'c',)
+
+ # Linker flags
+
+-linker_flags = [
+- '-Wl,-Bsymbolic-functions'
+-]
++if get_option('symbolic_functions')
++ linker_flags = [
++ '-Wl,-Bsymbolic-functions'
++ ]
+
+-foreach flag: linker_flags
+- assert(cc.has_link_argument(flag), flag + ' is required but not supported')
+- add_project_link_arguments(flag, language: 'c',)
+-endforeach
++ foreach flag: linker_flags
++ assert(cc.has_link_argument(flag), flag + ' is required but not
supported')
++ add_project_link_arguments(flag, language: 'c',)
++ endforeach
++endif
+
+ # Dependencies
+
Index: patches/patch-meson_options_txt
===================================================================
RCS file: patches/patch-meson_options_txt
diff -N patches/patch-meson_options_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-meson_options_txt 25 Nov 2020 19:28:01 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+ERROR: Assert failed: -Wl,-Bsymbolic-functions is required but not supported
+
+Index: meson_options.txt
+--- meson_options.txt.orig
++++ meson_options.txt
+@@ -61,3 +61,10 @@ option(
+ value: true,
+ description: 'Enable Vala bindings',
+ )
++
++option(
++ 'symbolic_functions',
++ type: 'boolean',
++ value: true,
++ description: 'Enable bind defined function symbols locally',
++)