summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qglobalstatic.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/corelib/global/qglobalstatic.h b/src/corelib/global/qglobalstatic.h
index ad39452cf4..1c44569dbd 100644
--- a/src/corelib/global/qglobalstatic.h
+++ b/src/corelib/global/qglobalstatic.h
@@ -68,8 +68,17 @@ enum GuardValues {
// until the constructor returns ...
// We better avoid these kind of problems by using our own locked implementation.
+#if defined(Q_OS_UNIX) && defined(Q_CC_INTEL)
+// Work around Intel issue ID 6000058488:
+// local statics inside an inline function inside an anonymous namespace are global
+// symbols (this affects the IA-64 C++ ABI, so OS X and Linux only)
+# define Q_GLOBAL_STATIC_INTERNAL_DECORATION Q_DECL_HIDDEN
+#else
+# define Q_GLOBAL_STATIC_INTERNAL_DECORATION Q_DECL_HIDDEN inline
+#endif
+
#define Q_GLOBAL_STATIC_INTERNAL(ARGS) \
- Q_DECL_HIDDEN inline Type *innerFunction() \
+ Q_GLOBAL_STATIC_INTERNAL_DECORATION Type *innerFunction() \
{ \
struct HolderBase { \
~HolderBase() Q_DECL_NOTHROW \