summaryrefslogtreecommitdiff
path: root/recipes/pulseaudio
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2009-07-07 22:21:30 +0200
committerHenning Heinold <heinold@inf.fu-berlin.de>2009-07-12 13:18:26 +0200
commit5f076af70ba46750e654e63a1703c03c2a33ca63 (patch)
treecb95137ec7df87885dc24271fe42d2a53cb1cdad /recipes/pulseaudio
parent7c33f2e906a20e139d53b4f2d8fbc2773a4725b3 (diff)
pulseaudio: fix detection of tls for shared libraries
* bump PR
Diffstat (limited to 'recipes/pulseaudio')
-rw-r--r--recipes/pulseaudio/pulseaudio-0.9.15/tls_m4.patch30
-rw-r--r--recipes/pulseaudio/pulseaudio_0.9.15.bb3
2 files changed, 32 insertions, 1 deletions
diff --git a/recipes/pulseaudio/pulseaudio-0.9.15/tls_m4.patch b/recipes/pulseaudio/pulseaudio-0.9.15/tls_m4.patch
new file mode 100644
index 0000000000..7b333e3df9
--- /dev/null
+++ b/recipes/pulseaudio/pulseaudio-0.9.15/tls_m4.patch
@@ -0,0 +1,30 @@
+Index: pulseaudio-0.9.15/m4/tls.m4
+===================================================================
+--- pulseaudio-0.9.15.orig/m4/tls.m4 2008-08-19 23:25:02.000000000 +0200
++++ pulseaudio-0.9.15/m4/tls.m4 2009-07-10 09:55:25.266365511 +0200
+@@ -1,12 +1,19 @@
+ AC_DEFUN([CC_CHECK_TLS], [
+ AC_CACHE_CHECK([whether $CC knows __thread for Thread-Local Storage],
+ cc_cv_tls___thread,
+- [AC_COMPILE_IFELSE(
+- AC_LANG_PROGRAM(
+- [[static __thread int a = 6;]],
+- [[a = 5;]]),
+- [cc_cv_tls___thread=yes],
+- [cc_cv_tls___thread=no])
++ [AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
++ [chktls_save_LDFLAGS="$LDFLAGS"
++ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
++ chktls_save_CFLAGS="$CFLAGS"
++ CFLAGS="-fPIC $CFLAGS"
++ dnl If -shared works, test if TLS works in a shared library.
++ AC_LINK_IFELSE([int f() { return 0; }],
++ AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }],
++ [cc_cv_tls___thread=yes],
++ [cc_cv_tls___thread=no]),
++ [cc_cv_tls___thread=yes])
++ CFLAGS="$chktls_save_CFLAGS"
++ LDFLAGS="$chktls_save_LDFLAGS"], [cc_cv_tls___thread=no])
+ ])
+
+ AS_IF([test "x$cc_cv_tls___thread" = "xyes"],
diff --git a/recipes/pulseaudio/pulseaudio_0.9.15.bb b/recipes/pulseaudio/pulseaudio_0.9.15.bb
index 7abfe29177..639e449ccb 100644
--- a/recipes/pulseaudio/pulseaudio_0.9.15.bb
+++ b/recipes/pulseaudio/pulseaudio_0.9.15.bb
@@ -1,7 +1,7 @@
require pulseaudio.inc
DEPENDS += "gdbm speex"
-PR = "${INC_PR}.3"
+PR = "${INC_PR}.4"
inherit gettext
@@ -13,6 +13,7 @@ SRC_URI += "\
file://autoconf_version.patch;patch=1 \
file://gettext.patch;patch=1 \
file://fixbluezbuild.patch;patch=1 \
+ file://tls_m4.patch;patch=1 \
"
do_compile_prepend() {