configure: set -Wno-error-overloaded-virtual for clang builds
Commit Message
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 <maennich@google.com>
---
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
Comments
Matthias Maennich <maennich@google.com> a écrit:
[...]
> diff --git a/configure.ac b/configure.ac
[...]
> +dnl Check if we compile with clang and set flags accordingly
> +dnl TODO: fix that warning (spoiler: not trivial)
Rather than putting a TODO here, I think it's more useful to file a bug
in https://sourceware.org/bugzilla/enter_bug.cgi?product=libabigail with
the emitted output so that we can see/discuss/track what this is about.
I am not even sure that warning needs fixing because we intentionally
use virtual operator overloading for comparison operators in the design
of the IR. So I really think there is value in having this be exposed
in a bug report that we can see.
> +if `$CXX -v 2>&1 | grep 'clang version' > /dev/null 2>&1`; then
> + CXXFLAGS="$CXXFLAGS -Wno-error-overloaded-virtual"
> +fi
[...]
> 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 <maennich@google.com>
Acked-by: Dodji Seketeli <dodji@seketeli.org>
Applied to master, thanks.
Cheers,
On Wed, May 13, 2020 at 11:10:35AM +0200, Dodji Seketeli wrote:
>Matthias Maennich <maennich@google.com> a écrit:
>
>[...]
>
>> diff --git a/configure.ac b/configure.ac
>
>[...]
>
>> +dnl Check if we compile with clang and set flags accordingly
>> +dnl TODO: fix that warning (spoiler: not trivial)
>
>Rather than putting a TODO here, I think it's more useful to file a bug
>in https://sourceware.org/bugzilla/enter_bug.cgi?product=libabigail with
>the emitted output so that we can see/discuss/track what this is about.
>
>I am not even sure that warning needs fixing because we intentionally
>use virtual operator overloading for comparison operators in the design
>of the IR. So I really think there is value in having this be exposed
>in a bug report that we can see.
I opened https://sourceware.org/bugzilla/show_bug.cgi?id=25982 for that.
>
>> +if `$CXX -v 2>&1 | grep 'clang version' > /dev/null 2>&1`; then
>> + CXXFLAGS="$CXXFLAGS -Wno-error-overloaded-virtual"
>> +fi
>
>
>[...]
>
>> 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 <maennich@google.com>
>Acked-by: Dodji Seketeli <dodji@seketeli.org>
>
>Applied to master, thanks.
Thanks,
Cheers,
Matthias
>
>Cheers,
>
>--
> Dodji
Matthias Maennich <maennich@google.com> a écrit:
[...]
> I opened https://sourceware.org/bugzilla/show_bug.cgi?id=25982 for
> that.
Thanks!
Cheers,
@@ -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