Go to file
Thiago Macieira 3866c89dee Work around ICC bug in local static symbols for Q_GLOBAL_STATIC
When compiling the innerFunction() of the Q_GLOBAL_STATIC expansion, ICC
emits global symbols for the internal "holder" local static variable and
its guard. If there are two global statics of the same name in two
different .cpp files, the linker will incorrectly merge the two "holder"
variables.

This was noted between the "customTypes" global statics of qmetatype.cpp
and qdbusmetatype.cpp in a static build.

The C++ standard requires that local static variables declared in inline
functions must be the same, regardless of whether the body of the
function got inlined or not. The IA-64 C++ ABI does that by requiring
local static symbols for inline functions to be global and mergeable
("link once"). However, two functions in anonymous namespaces in
different files are not considered to be the same function, so their
local statics should not be merged. This is where ICC failed: the local
statics are global and mergeable, even though the function is in an
anonymous namespace. ICC correctly emits the function itself as a local
symbol.

Alternative solutions were:
  1) add "static", but you can't use a static symbol in a template
     parameter in C++98 mode
  2) remove the "inline" keyword, but then GCC 4.8 will not inline

Intel issue ID: 6000058488
Task-number: QTBUG-40053
Change-Id: I307622222499682dde711b2771c8cf7557400799
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-07-30 10:24:29 +02:00
bin automate handling of generated headers some more 2014-02-28 03:17:11 +01:00
config.tests Allow building against static ICU libs also on Unix 2014-04-29 14:42:26 +02:00
dist update changelog for QtSql 5.3.1 2014-06-23 12:54:53 +02:00
doc Merge remote-tracking branch 'origin/release' into stable 2014-05-12 14:01:46 +02:00
examples Doc: moved saxbookmarks example files 2014-07-09 12:17:34 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Android: Fix compiling targets with space in name 2014-07-08 08:35:49 +02:00
qmake qmake: Document the "aux" template type. 2014-07-25 09:24:39 +02:00
src Work around ICC bug in local static symbols for Q_GLOBAL_STATIC 2014-07-30 10:24:29 +02:00
tests tst_QSet: verify that {}-style initialization drops duplicates 2014-07-25 14:53:25 +02:00
tools Improve dbus cross compilation 2014-07-28 14:08:22 +02:00
util Introduce QChar::JoiningType enum and QChar::joiningType() method 2014-01-29 23:19:47 +01:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Add .dylib and .d to .gitignore 2014-03-29 00:40:46 +01:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Improve dbus cross compilation 2014-07-28 14:08:22 +02:00
configure.bat get rid of syncqt wrapper scripts 2013-05-13 21:54:48 +02:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL Doc: Update links in INSTALL file 2014-01-16 20:37:25 +01:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in LICENSE.LGPL 2014-03-31 12:36:33 +02:00
LICENSE.PREVIEW.COMMERCIAL Update LICENSE.PREVIEW.COMMERCIAL license 2013-06-03 20:04:26 +02:00
qtbase.pro untangle use of system vs. shell path(-list) semantics 2014-04-30 16:56:54 +02:00
sync.profile generate QGL header file from qgl.h 2014-07-18 14:54:11 +02:00