From patchwork Mon May 11 15:25:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Matthias_M=C3=A4nnich?= X-Patchwork-Id: 39227 From: maennich@google.com (Matthias Maennich) Date: Mon, 11 May 2020 17:25:55 +0200 Subject: [PATCH] configure: set -Wno-error-overloaded-virtual for clang builds Message-ID: <20200511152555.28454-1-maennich@google.com> When compiling with clang, several locations in the code emit the warning -Woverloaded-virtual. That warning is not trivial to fix. In order to allow CXX=clang++ ABIGAIL_DEVEL=1 development, demote the warning to not be an error when compiling with clang. * configure.ac: set -Wno-error-overloaded-virtual for clang++ Signed-off-by: Matthias Maennich Acked-by: Dodji Seketeli --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 9aea79f49e9a..1d485354d56c 100644 --- a/configure.ac +++ b/configure.ac @@ -646,6 +646,12 @@ if test x$ENABLE_UBSAN = xyes; then CXXFLAGS="$CXXFLAGS -fsanitize=undefined" fi +dnl Check if we compile with clang and set flags accordingly +dnl TODO: fix that warning (spoiler: not trivial) +if `$CXX -v 2>&1 | grep 'clang version' > /dev/null 2>&1`; then + CXXFLAGS="$CXXFLAGS -Wno-error-overloaded-virtual" +fi + dnl Check if several decls and constant are defined in dependant dnl libraries HAS_EM_AARCH64=no