1 |
tetromino 13/09/02 18:29:07 |
2 |
|
3 |
Added: glib-2.36.4-znodelete.patch |
4 |
Removed: glib-2.36.3-revert-ext34.patch |
5 |
Log: |
6 |
Fix segfaults in vlc and other applications that try to unload libgobject at runtime (bug #405173, thanks to Cédric D. for finding a good solution). Drop old ebuilds. |
7 |
|
8 |
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 dev-libs/glib/files/glib-2.36.4-znodelete.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/glib/files/glib-2.36.4-znodelete.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/glib/files/glib-2.36.4-znodelete.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: glib-2.36.4-znodelete.patch |
17 |
=================================================================== |
18 |
From 242de638a030e1fb3b467af182d985d7c3bbf185 Mon Sep 17 00:00:00 2001 |
19 |
From: Alexandre Rostovtsev <tetromino@g.o> |
20 |
Date: Mon, 2 Sep 2013 13:59:18 -0400 |
21 |
Subject: [PATCH] gobject: try to link with -Wl,-z,nodelete |
22 |
|
23 |
Since the type system does not support reloading its data and assumes |
24 |
that libgobject remains loaded for the lifetime of the process, we |
25 |
should link libgobject with a flag indicating that it can't be unloaded. |
26 |
|
27 |
https://bugzilla.gnome.org/show_bug.cgi?id=707298 |
28 |
--- |
29 |
configure.ac | 24 ++++++++++++++++++++++++ |
30 |
gobject/Makefile.am | 1 + |
31 |
2 files changed, 25 insertions(+) |
32 |
|
33 |
diff --git a/configure.ac b/configure.ac |
34 |
index 0a63601..dd1045a 100644 |
35 |
--- a/configure.ac |
36 |
+++ b/configure.ac |
37 |
@@ -3668,6 +3668,30 @@ fi |
38 |
AC_SUBST(GLIB_LINK_FLAGS) |
39 |
|
40 |
dnl |
41 |
+dnl Check for -z,nodelete linker flag: the type system assumes that |
42 |
+dnl libgobject stays loaded for the lifetime of the process |
43 |
+dnl |
44 |
+ |
45 |
+AC_ARG_ENABLE([znodelete], |
46 |
+ [AS_HELP_STRING([--disable-znodelete], |
47 |
+ [avoid linking with -z,nodelete])],, |
48 |
+ [SAVED_LDFLAGS="${LDFLAGS}" |
49 |
+ AC_MSG_CHECKING([for -z,nodelete linker flag]) |
50 |
+ LDFLAGS=-Wl,-z,nodelete |
51 |
+ AC_TRY_LINK([], [int main (void) { return 0; }], |
52 |
+ AC_MSG_RESULT(yes) |
53 |
+ enable_znodelete=yes, |
54 |
+ AC_MSG_RESULT(no) |
55 |
+ enable_znodelete=no) |
56 |
+ LDFLAGS="${SAVED_LDFLAGS}"]) |
57 |
+ |
58 |
+if test "x${enable_znodelete}" = "xyes"; then |
59 |
+ GOBJECT_LINK_FLAGS=-Wl,-z,nodelete |
60 |
+fi |
61 |
+ |
62 |
+AC_SUBST(GOBJECT_LINK_FLAGS) |
63 |
+ |
64 |
+dnl |
65 |
dnl Check for -fvisibility=hidden to determine if we can do GNU-style |
66 |
dnl visibility attributes for symbol export control |
67 |
dnl |
68 |
diff --git a/gobject/Makefile.am b/gobject/Makefile.am |
69 |
index 1509616..181ad7d 100644 |
70 |
--- a/gobject/Makefile.am |
71 |
+++ b/gobject/Makefile.am |
72 |
@@ -45,6 +45,7 @@ endif |
73 |
|
74 |
libgobjectincludedir = $(includedir)/glib-2.0/gobject |
75 |
libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \ |
76 |
+ $(GOBJECT_LINK_FLAGS) \ |
77 |
$(gobject_win32_res_ldflag) \ |
78 |
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ |
79 |
-export-dynamic $(no_undefined) |
80 |
-- |
81 |
1.8.3.2 |