BugĀ 600141 - Add -pthread to gmodule pkg-config
authorRyan Lortie <desrt@desrt.ca>
Wed, 18 Nov 2009 02:41:48 +0000 (20:41 -0600)
committerRyan Lortie <desrt@desrt.ca>
Wed, 18 Nov 2009 02:41:48 +0000 (20:41 -0600)
It is not generally permissible to dlopen() libpthread into a program
that is not already linked with threading support.  The most common case
of this happening is when GIO opens Gvfs (which includes DBus, which
links against libpthread).

Since gmodule is the way that most users cause this problem for
themselves and since the easiest workaround is to link the program with
-pthread, the best fix for the issue is to add -pthread to the gmodule
pkg-config.

gmodule-2.0-uninstalled.pc.in
gmodule-2.0.pc.in
gmodule-export-2.0.pc.in
gmodule-no-export-2.0-uninstalled.pc.in
gmodule-no-export-2.0.pc.in

index 9a0d8aacda07d3a15e11e90983214d08366d2034..68f3091613bc4dc4b1ae5a587d424c35f26a873f 100644 (file)
@@ -4,5 +4,5 @@ Name: GModule Uninstalled
 Description: Dynamic module loader for GLib, Not Installed
 Requires: glib-2.0-uninstalled
 Version: @VERSION@
-Libs: @G_MODULE_LDFLAGS@ ${pc_top_builddir}/${pcfiledir}/gmodule/libgmodule-2.0.la
-Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/gmodule
+Libs: @G_MODULE_LDFLAGS@ ${pc_top_builddir}/${pcfiledir}/gmodule/libgmodule-2.0.la @G_THREAD_LIBS@
+Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/gmodule @G_THREAD_CFLAGS@
index 7117b31e0d3eb91efd82771129e5f52d92c2c208..c9cd04c58c16159a90c28c15ebe198b44d2298f0 100644 (file)
@@ -9,6 +9,6 @@ Name: GModule
 Description: Dynamic module loader for GLib
 Requires: glib-2.0
 Version: @VERSION@
-Libs: -L${libdir} @G_MODULE_LDFLAGS@ -lgmodule-2.0 
+Libs: -L${libdir} @G_MODULE_LDFLAGS@ -lgmodule-2.0 @G_THREAD_LIBS@
 Libs.private: @G_MODULE_LIBS@
-Cflags:
+Cflags: @G_THREAD_CFLAGS@
index 4bf55973d92a1c22cccc2f769973f087e124872c..c9cd04c58c16159a90c28c15ebe198b44d2298f0 100644 (file)
@@ -9,6 +9,6 @@ Name: GModule
 Description: Dynamic module loader for GLib
 Requires: glib-2.0
 Version: @VERSION@
-Libs: -L${libdir} @G_MODULE_LDFLAGS@ -lgmodule-2.0
+Libs: -L${libdir} @G_MODULE_LDFLAGS@ -lgmodule-2.0 @G_THREAD_LIBS@
 Libs.private: @G_MODULE_LIBS@
-Cflags:
+Cflags: @G_THREAD_CFLAGS@
index bd49e9dc9c202d40a8c38c858c27548b2448d5d6..115820db4b3c384fdf0f1b6451a1ca7817c24e1e 100644 (file)
@@ -9,6 +9,6 @@ Name: GModule
 Description: Dynamic module loader for GLib
 Requires: glib-2.0
 Version: @VERSION@
-Libs: ${pc_top_builddir}/${pcfiledir}/gmodule/libgmodule-2.0.la
-Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/gmodule
+Libs: ${pc_top_builddir}/${pcfiledir}/gmodule/libgmodule-2.0.la @G_THREAD_LIBS@
+Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/gmodule @G_THREAD_CFLAGS@
 
index 6c4c2318f892e0ff16e5ce1b2b7635fb5ec0f95b..3edd98b6df0bdbd0d1f6aadc4763d541b949e074 100644 (file)
@@ -9,6 +9,6 @@ Name: GModule
 Description: Dynamic module loader for GLib
 Requires: glib-2.0
 Version: @VERSION@
-Libs: -L${libdir} -lgmodule-2.0
+Libs: -L${libdir} -lgmodule-2.0 @G_THREAD_LIBS@
 Libs.private: @G_MODULE_LIBS@
-Cflags:
+Cflags: @G_THREAD_CFLAGS@