You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ts...@apache.org on 2014/08/21 21:17:31 UTC

git commit: MESOS-1208: Add -Wno-unused-local-typedefs if gcc version is >= 4.8

Repository: mesos
Updated Branches:
  refs/heads/master 70784a9f2 -> 9e68e980a


MESOS-1208: Add -Wno-unused-local-typedefs if gcc version is >= 4.8

Fixes `MESOS-1208`. The issue is that starting from GCC 4.8, `-Wall` includes `-Wunused-local-typedefs` by default. Since `-Werror` is also present, we end up with an error. I think the better fix would be to update boost, but this fix has less risk.

EDIT: Turns out we were already handling this, but only for GCC 4.8. Modify `configure.ac` to handle it for >= GCC 4.8 instead.

Review: https://reviews.apache.org/r/24816


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9e68e980
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9e68e980
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9e68e980

Branch: refs/heads/master
Commit: 9e68e980a90cf41727fcd74f70740ee7c34f50fe
Parents: 70784a9
Author: Michael Park <mc...@gmail.com>
Authored: Thu Aug 21 14:13:23 2014 -0500
Committer: Timothy St. Clair <ts...@redhat.com>
Committed: Thu Aug 21 14:13:23 2014 -0500

----------------------------------------------------------------------
 configure.ac | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9e68e980/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 73ccbbe..996c21d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -497,11 +497,11 @@ else
     CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
   fi
 
-  # Check for GCC version 4.8.
-  AX_COMPARE_VERSION([$GCC_VERSION], [eq2], [4.8],
-                     [is_gxx48=yes], [is_gxx48=no])
-  if test "x$is_gxx48" = "xyes"; then
-    AC_MSG_NOTICE([Setting up CXXFLAGS for g++-4.8])
+  # Check for GCC version >= 4.8.
+  AX_COMPARE_VERSION([$GCC_VERSION], [ge], [4.8],
+                     [is_ge_gxx48=yes], [is_ge_gxx48=no])
+  if test "x$is_ge_gxx48" = "xyes"; then
+    AC_MSG_NOTICE([Setting up CXXFLAGS for g++ version >= 4.8])
     # Boost 1.53.0 fails to compile with GCC 4.8 without
     # -Wno-unused-local-typedefs, and automake does not recognize the
     # flag.