-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path0089-Don-t-use-Wno-sign-compare-Wno-conversion-Wno-error-.patch
47 lines (40 loc) · 1.73 KB
/
0089-Don-t-use-Wno-sign-compare-Wno-conversion-Wno-error-.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <[email protected]>
Date: Thu, 11 Jul 2019 18:20:37 +0200
Subject: [PATCH] Don't use -Wno-sign-compare -Wno-conversion -Wno-error, do
use -Wextra.
Updated for grub-2.12 which introduced new sign comparison problems:
we're using -Wno-error=sign-compare
Signed-off-by: Peter Jones <[email protected]>
---
configure.ac | 8 ++++++++
conf/Makefile.common | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 2175aa56997..81240397384 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2147,6 +2147,14 @@ if test x"$enable_werror" != xno ; then
fi
fi
+AC_ARG_ENABLE([wextra],
+ [AS_HELP_STRING([--disable-wextra],
+ [do not use -Wextra when building GRUB])])
+if test x"$enable_wextra" != xno ; then
+ TARGET_CFLAGS="$TARGET_CFLAGS -Wextra"
+ HOST_CFLAGS="$HOST_CFLAGS -Wextra"
+fi
+
TARGET_CPP="$TARGET_CC -E"
TARGET_CCAS=$TARGET_CC
diff --git a/conf/Makefile.common b/conf/Makefile.common
index 54f0f7f7664..e53ff352407 100644
--- a/conf/Makefile.common
+++ b/conf/Makefile.common
@@ -76,7 +76,7 @@ grubconfdir = $(sysconfdir)/grub.d
platformdir = $(pkglibdir)/$(target_cpu)-$(platform)
starfielddir = $(pkgdatadir)/themes/starfield
-CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -Wno-error=attributes
+CFLAGS_GNULIB = -Wno-undef -Wno-error=sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-error=attributes
CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/lib/gnulib -I$(top_srcdir)/grub-core/lib/gnulib
CFLAGS_POSIX = -fno-builtin