summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorRalf Nolden <nolden@kde.org>2016-05-25 11:51:52 +0200
committerRalf Nolden <nolden@kde.org>2016-05-27 19:40:43 +0000
commitc85f988fc785690ade283305181de8e7256d4040 (patch)
treeba0f66b3e42448414787c198b60e8a832b71294c /src/corelib/global
parent0e70d35f151c52a8821be987e4cd1aef3d40b010 (diff)
Disable thread_local on clang for FreeBSD
FreeBSD's clang currently is not able to handle thread_local calls due to linker errors on __cxa_thread_atexit. The patch disables the define Q_COMPILER_THREAD_LOCAL for clang __FreeBSD__ only, no functional change. Otherwise, linking the tst_compiler autotest will fail. For details, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Change-Id: I2395c06499d4821213e2154769ccbeed3dcf1ffe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qcompilerdetection.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 8574059616..ad881ef4c9 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -699,7 +699,9 @@
# define Q_COMPILER_TEMPLATE_ALIAS
# endif
# if __has_feature(cxx_thread_local)
-# define Q_COMPILER_THREAD_LOCAL
+# if !defined(__FreeBSD__) /* FreeBSD clang fails on __cxa_thread_atexit */
+# define Q_COMPILER_THREAD_LOCAL
+# endif
# endif
# if __has_feature(cxx_user_literals)
# define Q_COMPILER_UDL