Daniel Andersson <kodandersson@gmail.com>
Alexander Botero-Lowry <alexbl@FreeBSD.org>
Matt Hanselman <mjhanselman@gmail.com>
+Craig Schlenter <craig.schlenter@gmail.com>
if ANDROID_TOP is None:
ANDROID_TOP=""
+# TODO: Sort these issues out properly but as a temporary solution for gcc 4.4
+# on linux we need these compiler flags to avoid a mksnapshot segfault, avoid
+# crashes in the v8 test suite and avoid dtoa.c strict aliasing issues
+if os.environ.get('GCC_VERSION') == "44":
+ GCC_EXTRA_CCFLAGS = ['-fno-tree-vectorize', '-fno-tree-vrp']
+ GCC_DTOA_EXTRA_CCFLAGS = ['-fno-strict-aliasing']
+else:
+ GCC_EXTRA_CCFLAGS = []
+ GCC_DTOA_EXTRA_CCFLAGS = []
+
ANDROID_FLAGS = ['-march=armv5te',
'-mtune=xscale',
'-msoft-float',
}
},
'os:linux': {
- 'CCFLAGS': ['-ansi'],
+ 'CCFLAGS': ['-ansi'] + GCC_EXTRA_CCFLAGS,
'library:shared': {
'LIBS': ['pthread']
}
DTOA_EXTRA_FLAGS = {
'gcc': {
'all': {
- 'WARNINGFLAGS': ['-Werror', '-Wno-uninitialized']
+ 'WARNINGFLAGS': ['-Werror', '-Wno-uninitialized'],
+ 'CCFLAGS': GCC_DTOA_EXTRA_CCFLAGS
}
},
'msvc': {
'variables': {
'chromium_code': 1,
'msvs_use_common_release': 0,
+ 'gcc_version%': 'unknown',
'base_source_files': [
'../../src/arm/assembler-arm-inl.h',
'../../src/arm/assembler-arm.cc',
'-fomit-frame-pointer',
'-O3',
],
+ 'conditions': [
+ [ 'gcc_version=="44"', {
+ 'cflags': [
+ # Avoid gcc 4.4 strict aliasing issues in dtoa.c
+ '-fno-strict-aliasing',
+ # Avoid gcc 4.4 mksnapshot segfault.
+ '-fno-tree-vectorize',
+ # Avoid crashes with gcc 4.4 in the v8 test suite.
+ '-fno-tree-vrp',
+ ],
+ }],
+ ],
'cflags_cc': [
'-fno-rtti',
],