diff -ruN /var/abs/core/glib2/dont-unload.patch ./dont-unload.patch --- /var/abs/core/glib2/dont-unload.patch 1970-01-01 01:00:00.000000000 +0100 +++ ./dont-unload.patch 2014-03-30 04:13:20.314059039 +0200 @@ -0,0 +1,75 @@ +From 274239a62f9f2a9f23030b94c1fb4df17ce88418 Mon Sep 17 00:00:00 2001 +From: Alexandre Rostovtsev +Date: Mon, 2 Sep 2013 13:59:18 -0400 +Subject: [PATCH] gobject: try to link with -Wl,-z,nodelete + +Since the type system does not support reloading its data and assumes +that libgobject remains loaded for the lifetime of the process, we +should link libgobject with a flag indicating that it can't be unloaded. + +https://bugzilla.gnome.org/show_bug.cgi?id=707298 +--- + configure.ac | 34 ++++++++++++++++++++++++++++++++++ + gobject/Makefile.am | 1 + + 2 files changed, 35 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 0a63601..7c5e39c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3668,6 +3668,40 @@ 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. ++dnl Since ld.bfd does not treat wrong -z options as fatal by default, ++dnl we also try to check for the --fatal-warnings linker flag if ++dnl auto-detecting. ++dnl ++ ++AC_ARG_ENABLE([znodelete], ++ [AS_HELP_STRING([--disable-znodelete], ++ [avoid linking with -z,nodelete])],, ++ [SAVED_LDFLAGS="${LDFLAGS}" ++ AC_MSG_CHECKING([for --fatal-warnings linker flag]) ++ LDFLAGS=-Wl,--fatal-warnings ++ AC_TRY_LINK([], [int main (void) { return 0; }], ++ AC_MSG_RESULT(yes) ++ [ldflags_fatal=-Wl,--fatal-warnings], ++ AC_MSG_RESULT(no) ++ ldflags_fatal=) ++ AC_MSG_CHECKING([for -z,nodelete linker flag]) ++ LDFLAGS="$ldflags_fatal -Wl,-z,nodelete" ++ AC_TRY_LINK([], [int main (void) { return 0; }], ++ AC_MSG_RESULT(yes) ++ enable_znodelete=yes, ++ AC_MSG_RESULT(no) ++ enable_znodelete=no) ++ LDFLAGS="${SAVED_LDFLAGS}"]) ++ ++if test "x${enable_znodelete}" = "xyes"; then ++ GOBJECT_LINK_FLAGS=-Wl,-z,nodelete ++fi ++ ++AC_SUBST(GOBJECT_LINK_FLAGS) ++ ++dnl + dnl Check for -fvisibility=hidden to determine if we can do GNU-style + dnl visibility attributes for symbol export control + dnl +diff --git a/gobject/Makefile.am b/gobject/Makefile.am +index 1509616..181ad7d 100644 +--- a/gobject/Makefile.am ++++ b/gobject/Makefile.am +@@ -45,6 +45,7 @@ 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) +-- +1.8.3.2 + diff -ruN /var/abs/core/glib2/PKGBUILD ./PKGBUILD --- /var/abs/core/glib2/PKGBUILD 2014-03-30 00:05:49.996571746 +0100 +++ ./PKGBUILD 2014-03-30 04:26:10.934047843 +0200 @@ -10,13 +10,16 @@ arch=(i686 x86_64) makedepends=('pkg-config' 'python2' 'libxslt' 'docbook-xml' 'pcre' 'libffi' 'elfutils') source=(http://ftp.gnome.org/pub/GNOME/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz - revert-warn-glib-compile-schemas.patch) + revert-warn-glib-compile-schemas.patch dont-unload.patch) sha256sums=('056a9854c0966a0945e16146b3345b7a82562a5ba4d5516fd10398732aea5734' - '049240975cd2f1c88fbe7deb28af14d4ec7d2640495f7ca8980d873bb710cc97') + '049240975cd2f1c88fbe7deb28af14d4ec7d2640495f7ca8980d873bb710cc97' + 'd5503fd0e02c00af944efe17d9203f6d2d61dd144ab5ffc44f399ce05a95d060') prepare() { cd glib-$pkgver patch -Rp1 -i ../revert-warn-glib-compile-schemas.patch + patch -p1 -i ../dont-unload.patch + autoreconf -fiv } build() {