diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-05-16 16:45:27 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2012-05-16 16:45:27 +0200 |
commit | 384496dd02cfd9a74b95d62ce0d23a31a7af3730 (patch) | |
tree | 056675b9a2d44cc46673e183a912ab33b2483718 | |
parent | acc5c79dd60c1c2aa528743394e3a9fad7f5def3 (diff) | |
download | android_external_fuse-384496dd02cfd9a74b95d62ce0d23a31a7af3730.tar.gz android_external_fuse-384496dd02cfd9a74b95d62ce0d23a31a7af3730.tar.bz2 android_external_fuse-384496dd02cfd9a74b95d62ce0d23a31a7af3730.zip |
Fix -pthread in fuse.pc
Linking to a library that uses threads requires the application to be linked
with -pthreads otherwise some pthread functions will be linked to stubs in
glibc. So move -pthread from Libs.private to Libs in fuse.pc.
Reported by Werner Fink
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | configure.in | 5 | ||||
-rw-r--r-- | fuse.pc.in | 2 | ||||
-rw-r--r-- | lib/Makefile.am | 2 |
4 files changed, 11 insertions, 5 deletions
@@ -1,3 +1,10 @@ +2012-05-16 Miklos Szeredi <miklos@szeredi.hu> + + * Linking to a library that uses threads requires the application + to be linked with -pthreads otherwise some pthread functions will + be linked to stubs in glibc. So move -pthread from Libs.private + to Libs in fuse.pc. Reported by Werner Fink + 2012-04-20 Miklos Szeredi <miklos@szeredi.hu> * Released 2.9.0 diff --git a/configure.in b/configure.in index f2e6c87..e9ce79b 100644 --- a/configure.in +++ b/configure.in @@ -60,11 +60,10 @@ AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat]) AC_CHECK_MEMBERS([struct stat.st_atim]) AC_CHECK_MEMBERS([struct stat.st_atimespec]) -libfuse_libs="-pthread" LIBS= AC_SEARCH_LIBS(dlopen, [dl]) AC_SEARCH_LIBS(clock_gettime, [rt]) -libfuse_libs="$libfuse_libs $LIBS" +libfuse_libs=$LIBS LIBS= AC_ARG_WITH([libiconv-prefix], [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ @@ -74,7 +73,7 @@ AC_ARG_WITH([libiconv-prefix], done ]) AM_ICONV -libfuse_libs="$libfuse_libs $LTLIBICONV" +libfuse_libs=$libfuse_libs $LTLIBICONV AM_CONDITIONAL(ICONV, test "$am_cv_func_iconv" = yes) AC_SUBST(libfuse_libs) @@ -6,6 +6,6 @@ includedir=@includedir@ Name: fuse Description: Filesystem in Userspace Version: @VERSION@ -Libs: -L${libdir} -lfuse +Libs: -L${libdir} -lfuse -pthread Libs.private: @libfuse_libs@ Cflags: -I${includedir}/fuse -D_FILE_OFFSET_BITS=64 diff --git a/lib/Makefile.am b/lib/Makefile.am index 010b244..5ca5739 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -36,7 +36,7 @@ libfuse_la_SOURCES = \ $(iconv_source) \ $(mount_source) -libfuse_la_LDFLAGS = @libfuse_libs@ -version-number 2:9:0 \ +libfuse_la_LDFLAGS = -pthread @libfuse_libs@ -version-number 2:9:0 \ -Wl,--version-script,$(srcdir)/fuse_versionscript if NETBSD |