spu2x:zzogl: disable TLS

builds an Utilies_NO_TLS.a archive of the common Utilities code. It replaces native TLS by a slower reimplementation

Rational: number of TLS slot is very limited by the GLIBc on linux. I hope it doesn't impact performance.
* Zzogl don't requires TLS AFAIK
* spu2x will likely use it for assertions only.

TLS exhaustion creates issue to dlopen plugins
    issue #384 : https://github.com/PCSX2/pcsx2/issues/384

But also for profiled build (-fprofile-generate)
    http://forums.pcsx2.net/Thread-WORKAROUND-build-with-fprofile-generate

If someone have a better idea, please raise your hand!
This commit is contained in:
Gregory Hainaut 2014-12-08 22:26:46 +01:00
parent 0a4f9e43d9
commit a52f598369
4 changed files with 4 additions and 3 deletions

View File

@ -63,7 +63,7 @@ extern ConsoleLogSource_Threading pxConLog_Thread;
// For complimentary support for TLS, include Utilities/TlsVariable.inl, and use the
// DeclareTls macro in the place of __threadlocal.
//
//#define PCSX2_THREAD_LOCAL 0 // uncomment this line to force-disable native TLS (useful for testing TlsVariabel on windows/linux)
//#define PCSX2_THREAD_LOCAL 0 // uncomment this line to force-disable native TLS (useful for testing TlsVariable on windows/linux)
#ifndef PCSX2_THREAD_LOCAL
# ifdef __WXMAC__

View File

@ -176,3 +176,4 @@ set(UtilitiesFinalLibs
)
add_pcsx2_lib(${Output} "${UtilitiesFinalSources}" "${UtilitiesFinalLibs}" "${UtilitiesFinalFlags}")
add_pcsx2_lib(${Output}_NO_TLS "${UtilitiesFinalSources}" "${UtilitiesFinalLibs}" "${UtilitiesFinalFlags} -DPCSX2_THREAD_LOCAL=0")

View File

@ -120,7 +120,7 @@ set(spu2xFinalSources
)
set(spu2xFinalLibs
Utilities
Utilities_NO_TLS
${ALSA_LIBRARIES}
${PORTAUDIO_LIBRARIES}
${GTK2_LIBRARIES}

View File

@ -190,7 +190,7 @@ set(zzoglFinalSources
)
set(zzoglFinalLibs
Utilities
Utilities_NO_TLS
${OPENGL_LIBRARIES}
)