]> git.pld-linux.org Git - packages/glib2.git/commitdiff
- take patch from git which fixes vlc segfaults auto/th/glib2-2.40.0-2 auto/ti/glib2-2.40.0-2
authorJan Palus <atler@pld-linux.org>
Fri, 2 May 2014 12:18:55 +0000 (14:18 +0200)
committerJan Palus <atler@pld-linux.org>
Fri, 2 May 2014 12:18:55 +0000 (14:18 +0200)
- rel 2

See https://bugzilla.gnome.org/show_bug.cgi?id=707298 for more info.

glib2-vlc-segfault.patch [new file with mode: 0644]
glib2.spec

diff --git a/glib2-vlc-segfault.patch b/glib2-vlc-segfault.patch
new file mode 100644 (file)
index 0000000..a394fc7
--- /dev/null
@@ -0,0 +1,71 @@
+From 3662eb9759fe225d1c214db6927c667a1b733e8a Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Mon, 2 Sep 2013 13:59:18 -0400
+Subject: 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
+
+diff --git a/configure.ac b/configure.ac
+index a01e58d..bdf34b0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3465,6 +3465,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 c683e84..02e9c25 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)
+-- 
+cgit v0.10.1
+
index fda5649f7816fe3c76d02c6290353a852722a509..84d687d924e4d4165a8fcfbe29a9ea00cc764e4c 100644 (file)
@@ -20,13 +20,14 @@ Summary(tr.UTF-8):  Yararlı ufak yordamlar kitaplığı
 Summary(zh_CN.UTF-8):  实用工具函数库
 Name:          glib2
 Version:       2.40.0
-Release:       1
+Release:       2
 Epoch:         1
 License:       LGPL v2+
 Group:         Libraries
 Source0:       http://ftp.gnome.org/pub/GNOME/sources/glib/2.40/glib-%{version}.tar.xz
 # Source0-md5: 05fb7cb17eacbc718e90366a1eae60d9
 Patch0:                %{name}-makefile.patch
+Patch1:                %{name}-vlc-segfault.patch
 URL:           http://www.gtk.org/
 BuildRequires: autoconf >= 2.62
 BuildRequires: automake >= 1:1.11
@@ -227,6 +228,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
This page took 0.233773 seconds and 4 git commands to generate.