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