nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0117-Don-t-use-Wno-sign-compare-Wno-conversion-Wno-error-.patch

5593c8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5593c8
From: Peter Jones <pjones@redhat.com>
5593c8
Date: Thu, 11 Jul 2019 18:20:37 +0200
5593c8
Subject: [PATCH] Don't use -Wno-sign-compare -Wno-conversion -Wno-error, do
5593c8
 use -Wextra.
5593c8
5593c8
Signed-off-by: Peter Jones <pjones@redhat.com>
5593c8
---
5593c8
 configure.ac         | 14 +++++++++++---
5593c8
 conf/Makefile.common |  2 +-
5593c8
 2 files changed, 12 insertions(+), 4 deletions(-)
5593c8
5593c8
diff --git a/configure.ac b/configure.ac
5593c8
index cfdac6bed5a..bd28edf3141 100644
5593c8
--- a/configure.ac
5593c8
+++ b/configure.ac
5593c8
@@ -1480,11 +1480,11 @@ fi
5593c8
 # Set them to their new values for the tests below.
5593c8
 CC="$TARGET_CC"
5593c8
 if test x"$platform" = xemu ; then
5593c8
-CFLAGS="$TARGET_CFLAGS -Wno-error"
5593c8
+CFLAGS="$TARGET_CFLAGS"
5593c8
 elif test "x$TARGET_APPLE_LINKER" = x1 ; then
5593c8
-CFLAGS="$TARGET_CFLAGS -nostdlib -static -Wno-error"
5593c8
+CFLAGS="$TARGET_CFLAGS -nostdlib -static"
5593c8
 else
5593c8
-CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
5593c8
+CFLAGS="$TARGET_CFLAGS -nostdlib"
5593c8
 fi
5593c8
 CPPFLAGS="$TARGET_CPPFLAGS"
5593c8
 
5593c8
@@ -2054,6 +2054,14 @@ if test x"$enable_werror" != xno ; then
5593c8
   HOST_CFLAGS="$HOST_CFLAGS -Werror"
5593c8
 fi
5593c8
 
5593c8
+AC_ARG_ENABLE([wextra],
5593c8
+	      [AS_HELP_STRING([--disable-wextra],
5593c8
+                             [do not use -Wextra when building GRUB])])
5593c8
+if test x"$enable_wextra" != xno ; then
5593c8
+  TARGET_CFLAGS="$TARGET_CFLAGS -Wextra"
5593c8
+  HOST_CFLAGS="$HOST_CFLAGS -Wextra"
5593c8
+fi
5593c8
+
5593c8
 TARGET_CPP="$TARGET_CC -E"
5593c8
 TARGET_CCAS=$TARGET_CC
5593c8
 
5593c8
diff --git a/conf/Makefile.common b/conf/Makefile.common
5593c8
index 2ff9b39357c..35e14ff017e 100644
5593c8
--- a/conf/Makefile.common
5593c8
+++ b/conf/Makefile.common
5593c8
@@ -66,7 +66,7 @@ grubconfdir = $(sysconfdir)/grub.d
5593c8
 platformdir = $(pkglibdir)/$(target_cpu)-$(platform)
5593c8
 starfielddir = $(pkgdatadir)/themes/starfield
5593c8
 
5593c8
-CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion
5593c8
+CFLAGS_GNULIB = -Wno-undef -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code
5593c8
 CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/lib/gnulib -I$(top_srcdir)/grub-core/lib/gnulib
5593c8
 
5593c8
 CFLAGS_POSIX = -fno-builtin