1 Star 0 Fork 98

yu_boyun/grub2

forked from src-openEuler/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0152-Don-t-use-Wno-sign-compare-Wno-conversion-Wno-error-.patch 2.05 KB
一键复制 编辑 原始数据 按行查看 历史
hanzj0122_admin 提交于 2020-07-29 20:47 . update to 2.04
From 7a86d5c7160b12f0608fa51cd5fa2fccd9b8f596 Mon Sep 17 00:00:00 2001
From: Peter Jones <[email protected]>
Date: Thu, 11 Jul 2019 18:20:37 +0200
Subject: [PATCH 152/220] Don't use -Wno-sign-compare -Wno-conversion
-Wno-error, do use -Wextra.
Signed-off-by: Peter Jones <[email protected]>
---
conf/Makefile.common | 2 +-
configure.ac | 14 +++++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/conf/Makefile.common b/conf/Makefile.common
index bbf33b0..b867691 100644
--- a/conf/Makefile.common
+++ b/conf/Makefile.common
@@ -66,7 +66,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
+CFLAGS_GNULIB = -Wno-undef -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code
CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/lib/gnulib -I$(top_srcdir)/grub-core/lib/gnulib
CFLAGS_POSIX = -fno-builtin
diff --git a/configure.ac b/configure.ac
index bca7c28..38d978b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1424,11 +1424,11 @@ fi
# Set them to their new values for the tests below.
CC="$TARGET_CC"
if test x"$platform" = xemu ; then
-CFLAGS="$TARGET_CFLAGS -Wno-error"
+CFLAGS="$TARGET_CFLAGS"
elif test "x$TARGET_APPLE_LINKER" = x1 ; then
-CFLAGS="$TARGET_CFLAGS -nostdlib -static -Wno-error"
+CFLAGS="$TARGET_CFLAGS -nostdlib -static"
else
-CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
+CFLAGS="$TARGET_CFLAGS -nostdlib"
fi
CPPFLAGS="$TARGET_CPPFLAGS"
@@ -1987,6 +1987,14 @@ if test x"$enable_werror" != xno ; then
HOST_CFLAGS="$HOST_CFLAGS -Werror"
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
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yu_boyun/grub2.git
[email protected]:yu_boyun/grub2.git
yu_boyun
grub2
grub2
master

搜索帮助