diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2012-07-11 05:19:12 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-07-11 05:52:13 +0400 |
commit | b40f813bab51b676efe37cc7f459c42ce806a18a (patch) | |
tree | 6a9a293cd1c9aa9f615e39e884e3642eefaa478f /configure | |
parent | bf561c52a5ed3979dd77b62e4b537456bbba9506 (diff) |
build: fix spurious mksnapshot crashes for good
A variety of gcc bugs made mksnapshot crash with either a segmentation fault
or a 'pure virtual method callled' run-time error.
After much wailing and gnashing of teeth I managed to deduce that the bugs
show up when:
1. gcc 4.5.2 for i386-pc-solaris2.11 is used and -fstrict-aliasing is
enabled, or
2. gcc version 4.4.6 for x86_64-redhat-linux is used and
-ffunction-sections -finline-functions at -O2 or higher is enabled
Therefore, disable -ffunction-sections and -fdata-sections unconditionally
and disable -fstrict-aliasing only on Solaris.
The -ffunction-sections and -fdata-sections switches were nonsense anyway
because we don't link with -Wl,--gc-sections.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/configure b/configure index 5e60c55f460..b7d8498abdc 100755 --- a/configure +++ b/configure @@ -288,13 +288,6 @@ def configure_node(o): cc_version, is_clang = compiler_version() - # turn off strict aliasing if gcc < 4.6.0 unless it's llvm-gcc - # see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45883 - # see http://code.google.com/p/v8/issues/detail?id=884 - no_strict_aliasing = int(not(is_clang or cc_version >= (4,6,0))) - o['variables']['v8_no_strict_aliasing'] = no_strict_aliasing - o['variables']['node_no_strict_aliasing'] = no_strict_aliasing - # clang has always supported -fvisibility=hidden, right? if not is_clang and cc_version < (4,0,0): o['variables']['visibility'] = '' @@ -303,9 +296,8 @@ def configure_node(o): # systems, since it won't work. (The MacOS build process is different than # SunOS, and we haven't implemented it.) if sys.platform.startswith('sunos'): - o['variables']['node_use_dtrace'] = b(not options.without_dtrace); - # Strict aliasing causes problems with the V8 snapshots on SunOS - o['variables']['strict_aliasing'] = b(False); + o['variables']['node_use_dtrace'] = b(not options.without_dtrace) + o['variables']['v8_no_strict_aliasing'] = 1 # work around compiler bug elif b(options.with_dtrace) == 'true': raise Exception('DTrace is currently only supported on SunOS systems.') else: |