diff --git a/gdb.spec b/gdb.spec index 03ad067..fec9600 100644 --- a/gdb.spec +++ b/gdb.spec @@ -556,7 +556,9 @@ cd %{gdb_build}$fprofile export CFLAGS="$RPM_OPT_FLAGS" # FIXME: gcc-7 compatibility. -CFLAGS="$CFLAGS -Wno-implicit-fallthrough" +if echo "" | gcc -x c -c - -o /dev/null -Wno-implicit-fallthrough >/dev/null 2>&1; then + CFLAGS="$CFLAGS -Wno-implicit-fallthrough" +fi export CXXFLAGS="$CFLAGS" export LIBRPM=no