Skip to content

Commit b731c96

Browse files
committed
build: disable -fstrict-aliasing for any gcc < 4.6.0
It has been conclusively demonstrated that the -fstrict-aliasing bugs in gcc's optimizer are not limited to the 4.5.x releases only. Fixes nodejs#3601 among others.
1 parent a0add91 commit b731c96

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

configure

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,9 @@ def configure_node(o):
287287
# turn off strict aliasing if gcc < 4.6.0 unless it's llvm-gcc
288288
# see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45883
289289
# see http://code.google.com/p/v8/issues/detail?id=884
290-
o['variables']['strict_aliasing'] = b(is_clang or cc_version >= (4,6,0))
291-
292-
# disable strict aliasing in V8 if we're compiling with gcc 4.5.x,
293-
# it makes V8 crash in various ways
294-
o['variables']['v8_no_strict_aliasing'] = b(
295-
not is_clang and (4,5,0) <= cc_version < (4,6,0))
290+
strict_aliasing = is_clang or cc_version >= (4,6,0)
291+
o['variables']['strict_aliasing'] = b(strict_aliasing)
292+
o['variables']['v8_no_strict_aliasing'] = b(not strict_aliasing)
296293

297294
# clang has always supported -fvisibility=hidden, right?
298295
if not is_clang and cc_version < (4,0,0):

0 commit comments

Comments
 (0)