diff options
Diffstat (limited to 'meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.22/tls_m4.patch')
| -rw-r--r-- | meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.22/tls_m4.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.22/tls_m4.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.22/tls_m4.patch new file mode 100644 index 0000000000..a8292b2e1c --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.22/tls_m4.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | Derived from OE by Dongxiao Xu <dongxiao.xu@intel.com> | ||
| 2 | |||
| 3 | Index: pulseaudio-0.9.15/m4/tls.m4 | ||
| 4 | =================================================================== | ||
| 5 | --- pulseaudio-0.9.15.orig/m4/tls.m4 2008-08-19 23:25:02.000000000 +0200 | ||
| 6 | +++ pulseaudio-0.9.15/m4/tls.m4 2009-07-10 09:55:25.266365511 +0200 | ||
| 7 | @@ -1,12 +1,19 @@ | ||
| 8 | AC_DEFUN([CC_CHECK_TLS], [ | ||
| 9 | AC_CACHE_CHECK([whether $CC knows __thread for Thread-Local Storage], | ||
| 10 | cc_cv_tls___thread, | ||
| 11 | - [AC_COMPILE_IFELSE( | ||
| 12 | - AC_LANG_PROGRAM( | ||
| 13 | - [[static __thread int a = 6;]], | ||
| 14 | - [[a = 5;]]), | ||
| 15 | - [cc_cv_tls___thread=yes], | ||
| 16 | - [cc_cv_tls___thread=no]) | ||
| 17 | + [AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }], | ||
| 18 | + [chktls_save_LDFLAGS="$LDFLAGS" | ||
| 19 | + LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" | ||
| 20 | + chktls_save_CFLAGS="$CFLAGS" | ||
| 21 | + CFLAGS="-fPIC $CFLAGS" | ||
| 22 | + dnl If -shared works, test if TLS works in a shared library. | ||
| 23 | + AC_LINK_IFELSE([int f() { return 0; }], | ||
| 24 | + AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }], | ||
| 25 | + [cc_cv_tls___thread=yes], | ||
| 26 | + [cc_cv_tls___thread=no]), | ||
| 27 | + [cc_cv_tls___thread=yes]) | ||
| 28 | + CFLAGS="$chktls_save_CFLAGS" | ||
| 29 | + LDFLAGS="$chktls_save_LDFLAGS"], [cc_cv_tls___thread=no]) | ||
| 30 | ]) | ||
| 31 | |||
| 32 | AS_IF([test "x$cc_cv_tls___thread" = "xyes"], | ||
