Fix build with GCC 4.8 #91

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

GCC 4.8 introduces a warning for unused typedefs, which libv8 triggers,
so we need to turn off error-on-warnings (werror).

This is for the master branch. 3.11 is in another pull request.

@ignisf ignisf commented on the diff Apr 9, 2013

ext/libv8/builder.rb
@@ -27,6 +27,9 @@ def make_flags(*flags)
# default.
flags << "ARFLAGS.target=crs"
+ # Fix the build with GCC 4.8 (the "unused typedef" warning)
+ flags << "werror=no"
@ignisf

ignisf Apr 9, 2013

Collaborator

Although it would decrease compilation failures, I think it would be best to limit the addition of this flag only to GCC 4.8.

@ignisf

ignisf Apr 9, 2013

Collaborator

Having seen http://code.google.com/p/v8/issues/detail?id=2149, I think we should take 4.8 out of the supported compilers and add unless check_gcc_compiler(compiler).

@randomguy3

randomguy3 Apr 9, 2013

Updated. I didn't go for actually removing 4.8 from the supported compilers, as it seemed like supporting the alternate BSD names (like "g++48") would get quite hacky. It would be easy enough to put a warning in either here or in compiler.rb, though.

I'm not sure what that warning should be. The issue with disabling werror, as I see it, is that there is a higher possibility that a problem with the build environment (and libv8's assumptions about the system libraries in particular) could go unnoticed, and as a result a buggy binary be built.

@randomguy3 randomguy3 Fix build with GCC 4.8
GCC 4.8 introduces a warning for unused typedefs, which libv8 triggers,
so we need to turn off error-on-warnings (werror).
26a2cef

ignisf closed this in #95 May 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment