pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/glib2 Re-add patches I wrote in October 2018:
details: https://anonhg.NetBSD.org/pkgsrc/rev/0befaf11d78e
branches: trunk
changeset: 455220:0befaf11d78e
user: prlw1 <prlw1%pkgsrc.org@localhost>
date: Wed Jun 30 14:26:11 2021 +0000
description:
Re-add patches I wrote in October 2018:
glib2's gobject subsystem is essentially a wrapper for dlopen. In
view of comments in PR lib/49791 which can be summarised as
"RTLD_GLOBAL is a bug", make gobject use RTLD_DEFAULT instead.
This should fix PR pkg/56212
The upstream merge request
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2171
has been updated - feel free to add a description of the problems you
experienced without this patch to it.
diffstat:
devel/glib2/Makefile | 3 +-
devel/glib2/distinfo | 4 +-
devel/glib2/patches/patch-gmodule_gmodule-dl.c | 45 ++++++++++++++++++++++++++
devel/glib2/patches/patch-gmodule_gmodule.c | 19 ++++++++++
4 files changed, 69 insertions(+), 2 deletions(-)
diffs (101 lines):
diff -r 2a04ee90d69c -r 0befaf11d78e devel/glib2/Makefile
--- a/devel/glib2/Makefile Wed Jun 30 14:09:25 2021 +0000
+++ b/devel/glib2/Makefile Wed Jun 30 14:26:11 2021 +0000
@@ -1,5 +1,6 @@
-# $NetBSD: Makefile,v 1.281 2021/04/13 19:22:14 adam Exp $
+# $NetBSD: Makefile,v 1.282 2021/06/30 14:26:11 prlw1 Exp $
+PKGREVISION= 1
.include "Makefile.common"
CATEGORIES= devel gnome
diff -r 2a04ee90d69c -r 0befaf11d78e devel/glib2/distinfo
--- a/devel/glib2/distinfo Wed Jun 30 14:09:25 2021 +0000
+++ b/devel/glib2/distinfo Wed Jun 30 14:26:11 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.287 2021/06/25 07:23:19 adam Exp $
+$NetBSD: distinfo,v 1.288 2021/06/30 14:26:11 prlw1 Exp $
SHA1 (glib-2.68.3.tar.xz) = aa1e007c1e6340981c0c8f6d715b63d37b3cfaea
RMD160 (glib-2.68.3.tar.xz) = 2e4d20249d9db0c108596db4e7691eb389bb9666
@@ -23,6 +23,8 @@
SHA1 (patch-glib_tests_hash.c) = a7e19ca55fcbbc0b188c34755cae5b6b65b67f1a
SHA1 (patch-glib_tests_include.c) = 12d98caebfb87c1146821d518c37c45f97fc7be0
SHA1 (patch-glib_tests_meson.build) = d358bd579eb09655c608106092bdeed8f16ff4d0
+SHA1 (patch-gmodule_gmodule-dl.c) = 7a179e4ae0fabb0e807bf061b06111ac910a8d82
+SHA1 (patch-gmodule_gmodule.c) = a020920b8e5bad34550c9963eb2fc27bef24c5c9
SHA1 (patch-gobject_glib-mkenums.in) = c177cf9b1ea81542665240678f47f68351a3760d
SHA1 (patch-gobject_meson.build) = 412b65558aa4cf9648ee84a57ad6dfcc988b1a1d
SHA1 (patch-meson.build) = f186c7e8ab2c5ba779a1227ae75b15adc0ea17f9
diff -r 2a04ee90d69c -r 0befaf11d78e devel/glib2/patches/patch-gmodule_gmodule-dl.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/glib2/patches/patch-gmodule_gmodule-dl.c Wed Jun 30 14:26:11 2021 +0000
@@ -0,0 +1,45 @@
+$NetBSD: patch-gmodule_gmodule-dl.c,v 1.3 2021/06/30 14:26:11 prlw1 Exp $
+
+RTL_GLOBAL is a bug.
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2171
+
+--- gmodule/gmodule-dl.c.orig 2021-06-10 18:57:57.268194400 +0000
++++ gmodule/gmodule-dl.c
+@@ -106,36 +106,13 @@ _g_module_open (const gchar *file_name,
+ static gpointer
+ _g_module_self (void)
+ {
+- gpointer handle;
+-
+- /* to query symbols from the program itself, special link options
+- * are required on some systems.
+- */
+-
+- /* On Android 32 bit (i.e. not __LP64__), dlopen(NULL)
+- * does not work reliable and generally no symbols are found
+- * at all. RTLD_DEFAULT works though.
+- * On Android 64 bit, dlopen(NULL) seems to work but dlsym(handle)
+- * always returns 'undefined symbol'. Only if RTLD_DEFAULT or
+- * NULL is given, dlsym returns an appropriate pointer.
+- */
+-#if defined(__BIONIC__)
+- handle = RTLD_DEFAULT;
+-#else
+- handle = dlopen (NULL, RTLD_GLOBAL | RTLD_LAZY);
+-#endif
+- if (!handle)
+- g_module_set_error (fetch_dlerror (TRUE));
+-
+- return handle;
++ return RTLD_DEFAULT;
+ }
+
+ static void
+ _g_module_close (gpointer handle)
+ {
+-#if defined(__BIONIC__)
+ if (handle != RTLD_DEFAULT)
+-#endif
+ {
+ if (dlclose (handle) != 0)
+ g_module_set_error (fetch_dlerror (TRUE));
diff -r 2a04ee90d69c -r 0befaf11d78e devel/glib2/patches/patch-gmodule_gmodule.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/glib2/patches/patch-gmodule_gmodule.c Wed Jun 30 14:26:11 2021 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-gmodule_gmodule.c,v 1.3 2021/06/30 14:26:11 prlw1 Exp $
+
+RTL_GLOBAL is a bug.
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2171
+
+--- gmodule/gmodule.c.orig 2021-06-10 18:57:57.268194400 +0000
++++ gmodule/gmodule.c
+@@ -506,9 +506,8 @@ g_module_open (const gchar *file_name
+ if (!main_module)
+ {
+ handle = _g_module_self ();
+-/* On Android 64 bit, RTLD_DEFAULT is (void *)0x0
+- * so it always fails to create main_module if file_name is NULL */
+-#if !defined(__BIONIC__) || !defined(__LP64__)
++/* On Linux, handle == RTLD_DEFAULT is (void *)0x0 */
++#if G_MODULE_IMPL != G_MODULE_IMPL_DL
+ if (handle)
+ #endif
+ {
Home |
Main Index |
Thread Index |
Old Index