From: Tom Tromey Date: Thu, 10 May 2018 14:38:51 +0000 (-0600) Subject: Fix the clang build X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a34f210bb9389e58d93caf4384800934fc7113a;p=binutils-gdb.git Fix the clang build Simon pointed out that gdb would not build with clang, due to the addition of -Wimplicit-fallthrough. This patch fixes the problem by using -Wimplicit-fallthrough=3 -- this does not work with clang, bypassing the issue. Tested by rebuilding with both gcc and clang; and also by verifying that -Wimplicit-fallthrough=3 is used in the gcc build. I will file a follow-up bug to convert the fall-through comments to a form that can be used by both clang and gcc. gdb/ChangeLog 2018-05-10 Tom Tromey * configure: Rebuild. * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3. gdb/gdbserver/ChangeLog 2018-05-10 Tom Tromey * configure: Rebuild. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3467467383a..f5ae5250c68 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-05-10 Tom Tromey + + * configure: Rebuild. + * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3. + 2018-05-10 Joel Brobecker PR server/23158: diff --git a/gdb/configure b/gdb/configure index 0eec780bd16..4186f7e1605 100755 --- a/gdb/configure +++ b/gdb/configure @@ -15367,7 +15367,7 @@ build_warnings="-Wall -Wpointer-arith \ -Wno-mismatched-tags \ -Wno-error=deprecated-register \ -Wsuggest-override \ --Wimplicit-fallthrough \ +-Wimplicit-fallthrough=3 \ -Wduplicated-cond" case "${host}" in diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 9ead1220a7c..36915cf736b 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2018-05-10 Tom Tromey + + * configure: Rebuild. + 2018-05-10 Joel Brobecker PR server/23158: diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index ac61ba3543f..b2e2e8f955a 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -7174,7 +7174,7 @@ build_warnings="-Wall -Wpointer-arith \ -Wno-mismatched-tags \ -Wno-error=deprecated-register \ -Wsuggest-override \ --Wimplicit-fallthrough \ +-Wimplicit-fallthrough=3 \ -Wduplicated-cond" case "${host}" in diff --git a/gdb/warning.m4 b/gdb/warning.m4 index cb23472ec6c..632cc214ac0 100644 --- a/gdb/warning.m4 +++ b/gdb/warning.m4 @@ -44,7 +44,7 @@ build_warnings="-Wall -Wpointer-arith \ -Wno-mismatched-tags \ -Wno-error=deprecated-register \ -Wsuggest-override \ --Wimplicit-fallthrough \ +-Wimplicit-fallthrough=3 \ -Wduplicated-cond" case "${host}" in