summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorcraig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-09 04:41:49 +0000
committercraig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-09 04:41:49 +0000
commit25964ef7c3b8913992d295c3d48fc227a614ed42 (patch)
tree0478bc41adfcdc7e478d89cd9b7fa32af68654c9 /chrome
parent7e6ecaaf0315c518b6223607d1684255c3d8c7a8 (diff)
downloadchromium_src-25964ef7c3b8913992d295c3d48fc227a614ed42.zip
chromium_src-25964ef7c3b8913992d295c3d48fc227a614ed42.tar.gz
chromium_src-25964ef7c3b8913992d295c3d48fc227a614ed42.tar.bz2
Linux: use -fno-strict-aliasing when compiling unit_tests with gcc 4.4.
This is needed to squash an aliasing error in stl_tree.h cc1plus: warnings being treated as errors ./chrome/common/mru_cache.h: In member function ‘virtual void MRUCacheTest_Basic_Test::TestBody()’: ./chrome/common/mru_cache.h:98: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules /usr/lib/gcc/i386-redhat-linux/4.4.0/../../../../include/c++/4.4.0/bits/stl_tree.h:184: note: initialized from here make: *** [out/Release/obj.target/unit_tests/chrome/common/mru_cache_unittest.o] Error 1 Bug 27030 has been filed to sort this out properly. Review URL: http://codereview.chromium.org/346040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31420 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rwxr-xr-xchrome/chrome.gyp9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 69f9687..a876f40 100755
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -4805,6 +4805,15 @@
],
}],
['OS=="linux"', {
+ 'conditions': [
+ [ 'gcc_version==44', {
+ # Avoid gcc 4.4 strict aliasing issues in stl_tree.h when
+ # building mru_cache_unittest.cc.
+ 'cflags': [
+ '-fno-strict-aliasing',
+ ],
+ }],
+ ],
'dependencies': [
'../build/linux/system.gyp:gtk',
'../build/linux/system.gyp:nss',