[packages/glib2] upstream patch to prevent unloading of libglib
atler
atler at pld-linux.org
Tue Oct 27 22:50:44 CET 2015
commit 638cbe5aefc287f6062caf18faf7ee7bd4bbfe99
Author: Jan Palus <atler at pld-linux.org>
Date: Tue Oct 27 22:48:18 2015 +0100
upstream patch to prevent unloading of libglib
fixes https://bugzilla.gnome.org/show_bug.cgi?id=755609
glib2-nodelete.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++
glib2.spec | 4 +++-
2 files changed, 59 insertions(+), 1 deletion(-)
---
diff --git a/glib2.spec b/glib2.spec
index 8fe4975..fedd966 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -20,13 +20,14 @@ Summary(tr.UTF-8): Yararlı ufak yordamlar kitaplığı
Summary(zh_CN.UTF-8): 实用工具函数库
Name: glib2
Version: 2.46.1
-Release: 1
+Release: 2
Epoch: 1
License: LGPL v2+
Group: Libraries
Source0: http://ftp.gnome.org/pub/GNOME/sources/glib/2.46/glib-%{version}.tar.xz
# Source0-md5: c90e93ceb45100ffc1d40ec5d2ca3248
Patch0: %{name}-makefile.patch
+Patch1: %{name}-nodelete.patch
URL: http://www.gtk.org/
BuildRequires: autoconf >= 2.62
BuildRequires: automake >= 1:1.11
@@ -231,6 +232,7 @@ Sondy systemtap/dtrace dla GLib 2.
%prep
%setup -q -n glib-%{version}
%patch0 -p1
+%patch1 -p1
%if %{without apidocs}
%{__sed} -e '/SUBDIRS/s/docs//' -i Makefile.am
diff --git a/glib2-nodelete.patch b/glib2-nodelete.patch
new file mode 100644
index 0000000..1c5ff78
--- /dev/null
+++ b/glib2-nodelete.patch
@@ -0,0 +1,56 @@
+From 2ac7c5a6fb3c4f169ba5b44df762f7dc43504bfa Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Thu, 15 Oct 2015 15:37:42 -0400
+Subject: Use -Wl,-znodelete for all our libraries
+
+Now that we initialize the quark tables from a constructor,
+reloading libglib is just as bad as reloading libgobject,
+so add the linker option to the LDFLAGS for all our libraries.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=755609
+---
+ configure.ac | 6 ++----
+ gobject/Makefile.am | 1 -
+ 2 files changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 10a001c..f13622c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3429,8 +3429,6 @@ if test "x${enable_Bsymbolic}" = "xyes"; then
+ GLIB_LINK_FLAGS=-Wl,-Bsymbolic-functions
+ fi
+
+-AC_SUBST(GLIB_LINK_FLAGS)
+-
+ dnl
+ dnl Check for -z,nodelete linker flag: the type system assumes that
+ dnl libgobject stays loaded for the lifetime of the process.
+@@ -3461,10 +3459,10 @@ AC_ARG_ENABLE([znodelete],
+ LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"])
+
+ if test "x${enable_znodelete}" = "xyes"; then
+- GOBJECT_LINK_FLAGS=-Wl,-z,nodelete
++ GLIB_LINK_FLAGS="$GLIB_LINK_FLAGS -Wl,-z,nodelete"
+ fi
+
+-AC_SUBST(GOBJECT_LINK_FLAGS)
++AC_SUBST(GLIB_LINK_FLAGS)
+
+ dnl
+ dnl Check for -fvisibility=hidden to determine if we can do GNU-style
+diff --git a/gobject/Makefile.am b/gobject/Makefile.am
+index 2108caa..5512c7e 100644
+--- a/gobject/Makefile.am
++++ b/gobject/Makefile.am
+@@ -45,7 +45,6 @@ endif
+
+ libgobjectincludedir = $(includedir)/glib-2.0/gobject
+ libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
+- $(GOBJECT_LINK_FLAGS) \
+ $(gobject_win32_res_ldflag) \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -export-dynamic $(no_undefined)
+--
+cgit v0.11.2
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/glib2.git/commitdiff/638cbe5aefc287f6062caf18faf7ee7bd4bbfe99
More information about the pld-cvs-commit
mailing list