Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use thread_local on mingw or OpenBSD builds #5541

Merged
merged 2 commits into from
Nov 7, 2017

Conversation

nyalldawson
Copy link
Collaborator

MingW has broken support for thread_local, so force disabling it. See:
https://sourceforge.net/p/mingw-w64/bugs/445/
https://sourceforge.net/p/mingw-w64/bugs/527/
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80816

Also OpenBSD has no thread_local support, see https://issues.qgis.org/issues/17351

So on these platforms we fall back to using QThreadStorage.

Fixes #17351

Supersedes #5504

MingW has broken support for thread_local, so force disabling it
see
https://sourceforge.net/p/mingw-w64/bugs/445/
https://sourceforge.net/p/mingw-w64/bugs/527/
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80816

also OpenBSD has no thread_local support, see https://issues.qgis.org/issues/17351

So on these platforms we fall back to using QThreadStorage.

Fixes qgis#17351
@lbartoletti
Copy link
Member

Hi @nyalldawson, please don't merge it now. I will build it today on FreeBSD. I think that we have c++11 thread_local. So, some ifdef will be incorrect.
Thanks.

@nyalldawson
Copy link
Collaborator Author

@lbartoletti sure, no rush here.

@lbartoletti
Copy link
Member

I have build master and #5504 both works on FreeBSD. We have c++11 thread_local (seems using pthread).

CMakeLists.txt Outdated
SET (WITH_THREAD_LOCAL TRUE CACHE BOOL "Determines whether std::thread_local should be used")
MARK_AS_ADVANCED(WITH_THREAD_LOCAL)

IF (MINGW OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove FreeBSD. Thanks.

@nyalldawson nyalldawson closed this Nov 7, 2017
@nyalldawson nyalldawson reopened this Nov 7, 2017
@nyalldawson nyalldawson merged commit e3f3499 into qgis:master Nov 7, 2017
@nyalldawson nyalldawson deleted the thread_local branch November 7, 2017 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants