sdk/cerbero: pixman: disable TLS in iOS

Andoni Morales ylatuya at gmail.com
Tue Oct 29 10:07:17 CET 2013


2013/10/29 Sebastian Dröge <sebastian at centricular.com>

> On Mo, 2013-10-28 at 13:33 -0700, Andoni Morales Alastruey wrote:
> > Module: sdk/cerbero
> > Branch: master
> > Commit: 4c29d8bc5b2487984e0415376f312bfd137729d4
> > URL:
> http://cgit.freedesktop.org/gstreamer/sdk/cerbero/commit/?id=4c29d8bc5b2487984e0415376f312bfd137729d4
> >
> > Author: Andoni Morales Alastruey <ylatuya at gmail.com>
> > Date:   Mon Oct 28 21:32:06 2013 +0100
> >
> > pixman: disable TLS in iOS
> >
> > TLS is not supported in this platform but the configure
> > check does not complain so it needs to be disabled manually
>
> Do you have some more details about this? It compiled fine for me and
> IIRC also worked on a device. How does it fail for you?
>
> What about Android, we had it disabled there too until recently but same
> story. Worked for me.
>

It's something thatI didn't expect failing. The check for TLS is in 2 steps:
1) Check for __thread or __declspec(thread)
2) Check for pthread_specific

In master the firt one succeeds, although it's not supported in the platorm:
*
libtool: compile:  llvm-gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -arch armv7
-mcpu=cortex-a8 -pipe -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
-arch armv7 -mcpu=cortex-a8 -pipe -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
-miphoneos-version-min=5.1 -Wall -g -Os -Wall -fno-strict-aliasing
-fvisibility=hidden -MT pixman-implementation.lo -MD -MP -MF
.deps/pixman-implementation.Tpo -c pixman-implementation.c  -fno-common
-DPIC -o .libs/pixman-implementation.o
{standard input}:819:Rest of line ignored. 1st junk character valued 40 (().
{standard input}:823:Rest of line ignored. 1st junk character valued 40 (().
{standard input}:827:Rest of line ignored. 1st junk character valued 40 (().
*
*
Using clang instead we get a most interesting result:

bash-3.2$ clang -DHAVE_CONFIG_H -I. -I.. -arch armv7 -mcpu=cortex-a8 -pipe
-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
-arch armv7 -mcpu=cortex-a8 -pipe -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
-miphoneos-version-min=5.1 -Wall -g -Os -Wall -fno-strict-aliasing
-fvisibility=hidden -MT pixman-implementation.lo -MD -MP -MF
.deps/pixman-implementation.Tpo -c pixman-implementation.c  -fno-common
-DPIC -o .libs/pixman-implementation.o
pixman-implementation.c:66:1: error: thread-local storage is unsupported
for the current target
PIXMAN_DEFINE_THREAD_LOCAL (cache_t, fast_path_cache);
^
In file included from pixman-implementation.c:28:
In file included from ./pixman-private.h:34:
./pixman-compiler.h:117:12: note: instantiated from:
    static TLS type name
           ^
In file included from pixman-implementation.c:25:
../config.h:117:13: note: instantiated from:
#define TLS __thread*

But I have been comparing the results with the old branch which was working
and at configure it does:

*checking for thread local storage (TLS) support... (cached) none
checking for pthread_setspecific... yes*

I believe it's a regression introduced in:
*
commit 85eff088acb80643ce78316a5ba4d8b354bac4d4
Author: Sebastian Dröge <slomo at circular-chaos.org>
Date:   Sat Sep 21 16:21:26 2013 +0200

    pixman: Build with TLS support on iOS and Android

    It works now

diff --git a/config/ios.config b/config/ios.config
index 800b780..071704a 100644
--- a/config/ios.config
+++ b/config/ios.config
@@ -102,6 +102,3 @@ os.environ['ac_cv_func_posix_getpwuid_r'] = 'yes'
 os.environ['ac_cv_func_posix_getgrgid_r'] = 'yes'
 os.environ['gt_cv_c_wchar_t'] = 'no'

-# For pixman
-os.environ['ac_cv_tls'] = 'none'
-*

Reverting both commits restores the situation.

Andoni



--
> Sebastian Dröge <sebastian at centricular.com>
> Centricular Ltd - http://www.centricular.com
> Expertise, Straight from the Source
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>


-- 
Andoni Morales Alastruey

LongoMatch:The Digital Coach
http://www.longomatch.ylatuya.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131029/a76a5101/attachment.html>


More information about the gstreamer-devel mailing list