This is an automated email from the ASF dual-hosted git repository.

chhsiao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit deeb3b021e2bf3e7bc0c9f7b6a93cdbc249d9708
Author: Chun-Hung Hsiao <chhs...@mesosphere.io>
AuthorDate: Wed Aug 1 14:42:17 2018 -0700

    Fixed gRPC compilation for standalone libprocess build with Clang.
    
    When compiling gRPC with Clang, there are some array-out-of-bound
    warnings due to the use of GLIBC's `__strcmp_cg` macro in the c-ares
    library. With `-Werror` on, these warnings would stop gRPC from
    compiling. This patch ignores such errors.
    
    Review: https://reviews.apache.org/r/68154
---
 3rdparty/libprocess/3rdparty/Makefile.am | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/3rdparty/libprocess/3rdparty/Makefile.am 
b/3rdparty/libprocess/3rdparty/Makefile.am
index da350b1..a0c7f38 100644
--- a/3rdparty/libprocess/3rdparty/Makefile.am
+++ b/3rdparty/libprocess/3rdparty/Makefile.am
@@ -221,16 +221,20 @@ LIB_GRPC = $(GRPC)/libs/opt/libgrpc++$(GRPC_VARIANT).a    
\
 
 $(LIB_GRPC): $(GRPC)-build-stamp
 
-# NOTE: We the include flags through the `CPPFLAGS` environment variable rather
-# than the command line because gRPC uses target-specific assignments to append
-# flags to `CPPFLAGS`, which will be overwritten by command line arguments. 
See:
+# NOTE: We include flags through the `CPPFLAGS` environment variable rather 
than
+# the command line because gRPC uses target-specific assignments to append 
flags
+# to `CPPFLAGS`, which will be overwritten by command line arguments. See:
 # https://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html
+#
+# NOTE: We ignore `array-bounds` errors generated by the GLIBC's `__strcmp_cg`
+# macro used in gRPC's c-ares library when compiled with Clang.
 $(GRPC)-build-stamp: $(GRPC)-stamp                     \
                      $(PROTOBUF)-build-stamp
        cd $(GRPC) &&                                   \
          CPPFLAGS="$(PROTOBUF_INCLUDE_FLAGS)           \
                    $(SSL_INCLUDE_FLAGS)                \
-                   $(ZLIB_INCLUDE_FLAGS)"              \
+                   $(ZLIB_INCLUDE_FLAGS)               \
+                   -Wno-array-bounds"                  \
          $(MAKE) $(AM_MAKEFLAGS)                       \
            $(LIB_GRPC:%=$(abs_builddir)/%)             \
            CC="$(CC)"                                  \

Reply via email to