--- /dev/null
+From 2ac7c5a6fb3c4f169ba5b44df762f7dc43504bfa Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@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
+
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
%prep
%setup -q -n glib-%{version}
%patch0 -p1
+%patch1 -p1
%if %{without apidocs}
%{__sed} -e '/SUBDIRS/s/docs//' -i Makefile.am