Fix GModule change resulting in missing exported symbols
This commit is contained in:
parent
bcd5f09e86
commit
92195a73d9
90
fix-missing-exported-symbols.patch
Normal file
90
fix-missing-exported-symbols.patch
Normal file
@ -0,0 +1,90 @@
|
||||
From 6e29fbec2dbc513e81252d0a83ab1e860c80c002 Mon Sep 17 00:00:00 2001
|
||||
From: Harald van Dijk <harald@gigawatt.nl>
|
||||
Date: Tue, 18 Jul 2023 18:26:43 +0100
|
||||
Subject: [PATCH] Revert "build/gmodule-2.0.pc: Move compiler flags from Libs
|
||||
to Cflags"
|
||||
|
||||
This reverts commit 004f48f4fc8adfccad51e2a7f4608c7fe3c28c7c.
|
||||
|
||||
Per the discussion on #3356, this change was prompted by a
|
||||
misunderstanding of ldflags/link_args, and it resulted in various other
|
||||
packages using glib no longer getting symbols exported. This commit
|
||||
restores the glib 2.76 behaviour.
|
||||
---
|
||||
gio/tests/meson.build | 2 +-
|
||||
gmodule/meson.build | 6 ++----
|
||||
meson.build | 10 +++++-----
|
||||
3 files changed, 8 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
|
||||
index 8d9c87c20c..1a0edad1f6 100644
|
||||
--- a/gio/tests/meson.build
|
||||
+++ b/gio/tests/meson.build
|
||||
@@ -774,7 +774,7 @@ if not meson.is_cross_build()
|
||||
|
||||
resource_plugin += shared_module('resourceplugin',
|
||||
sources: ['resourceplugin.c', plugin_resources_c],
|
||||
- c_args : export_dynamic_cflags,
|
||||
+ link_args : export_dynamic_ldflags,
|
||||
dependencies : common_gio_tests_deps,
|
||||
install_dir : installed_tests_execdir,
|
||||
install_tag : 'tests',
|
||||
diff --git a/gmodule/meson.build b/gmodule/meson.build
|
||||
index f7b41536e3..da4d06cfb5 100644
|
||||
--- a/gmodule/meson.build
|
||||
+++ b/gmodule/meson.build
|
||||
@@ -115,24 +115,22 @@ pkg.generate(libgmodule,
|
||||
description : 'Dynamic module loader for GLib',
|
||||
)
|
||||
|
||||
-pkg.generate(libraries : [libgmodule],
|
||||
+pkg.generate(libraries : [libgmodule, export_dynamic_ldflags],
|
||||
requires : ['glib-2.0'],
|
||||
version : glib_version,
|
||||
variables : [supported_var],
|
||||
install_dir : glib_pkgconfigreldir,
|
||||
filebase : 'gmodule-export-2.0',
|
||||
- extra_cflags : export_dynamic_cflags,
|
||||
name : 'GModule',
|
||||
description : 'Dynamic module loader for GLib',
|
||||
)
|
||||
|
||||
-pkg.generate(libraries : [libgmodule],
|
||||
+pkg.generate(libraries : [libgmodule, export_dynamic_ldflags],
|
||||
requires : ['glib-2.0'],
|
||||
version : glib_version,
|
||||
variables : [supported_var],
|
||||
install_dir : glib_pkgconfigreldir,
|
||||
filebase : 'gmodule-2.0',
|
||||
- extra_cflags : export_dynamic_cflags,
|
||||
name : 'GModule',
|
||||
description : 'Dynamic module loader for GLib',
|
||||
)
|
||||
diff --git a/meson.build b/meson.build
|
||||
index c7b5346260..3588dbe117 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -2328,15 +2328,15 @@ if host_system == 'windows'
|
||||
# Autotools explicitly removed --Wl,--export-all-symbols from windows builds,
|
||||
# with no explanation. Do the same here for now but this could be revisited if
|
||||
# if causes issues.
|
||||
- export_dynamic_cflags = []
|
||||
+ export_dynamic_ldflags = []
|
||||
elif host_system == 'cygwin'
|
||||
- export_dynamic_cflags = ['-Wl,--export-all-symbols']
|
||||
+ export_dynamic_ldflags = ['-Wl,--export-all-symbols']
|
||||
elif host_system in ['darwin', 'ios']
|
||||
- export_dynamic_cflags = []
|
||||
+ export_dynamic_ldflags = []
|
||||
elif host_system == 'sunos'
|
||||
- export_dynamic_cflags = []
|
||||
+ export_dynamic_ldflags = []
|
||||
else
|
||||
- export_dynamic_cflags = ['-Wl,--export-dynamic']
|
||||
+ export_dynamic_ldflags = ['-Wl,--export-dynamic']
|
||||
endif
|
||||
|
||||
win32_cflags = []
|
||||
--
|
||||
GitLab
|
||||
|
@ -20,6 +20,9 @@ Patch1: 0001-gmain-Add-a-missing-return-on-error-path-in-g_main_c.patch
|
||||
# the baremetal Docker is updated there i.e. lets be a little bit pragmatic...
|
||||
Patch2: gspawn-eperm.patch
|
||||
|
||||
# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3504
|
||||
Patch3: fix-missing-exported-symbols.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gettext
|
||||
|
Loading…
Reference in New Issue
Block a user