summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/module/grub/default/patches/0012-force-disable-werror.patch602
-rw-r--r--config/module/grub/nvme/patches/0013-force-disable-werror.patch602
-rw-r--r--config/module/grub/xhci_nvme/patches/0024-force-disable-werror.patch602
3 files changed, 1806 insertions, 0 deletions
diff --git a/config/module/grub/default/patches/0012-force-disable-werror.patch b/config/module/grub/default/patches/0012-force-disable-werror.patch
new file mode 100644
index 00000000..a4837f63
--- /dev/null
+++ b/config/module/grub/default/patches/0012-force-disable-werror.patch
@@ -0,0 +1,602 @@
+From 2adf79420721b5f7e25d657ba1a6bb60aa221bce Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Mon, 21 Sep 2026 12:13:16 +0100
+Subject: [PATCH 1/1] force-disable werror
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ Makefile.am | 4 +-
+ acinclude.m4 | 8 +--
+ conf/Makefile.common | 2 +-
+ configure.ac | 79 +++++++++++++---------------
+ grub-core/Makefile.am | 6 +--
+ grub-core/lib/libgcrypt/configure | 36 ++++++-------
+ grub-core/lib/libgcrypt/configure.ac | 14 ++---
+ 7 files changed, 72 insertions(+), 77 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 43635d5ff..0f7f55e83 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -89,11 +89,11 @@ CLEANFILES += garbage-gen$(BUILD_EXEEXT)
+ EXTRA_DIST += util/garbage-gen.c
+
+ build-grub-gen-asciih$(BUILD_EXEEXT): util/grub-gen-asciih.c
+- $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall -Werror
++ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall
+ CLEANFILES += build-grub-gen-asciih$(BUILD_EXEEXT)
+
+ build-grub-gen-widthspec$(BUILD_EXEEXT): util/grub-gen-widthspec.c
+- $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall -Werror
++ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall
+ CLEANFILES += build-grub-gen-widthspec$(BUILD_EXEEXT)
+
+ if COND_STARFIELD
+diff --git a/acinclude.m4 b/acinclude.m4
+index fa7840f09..d871737fd 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -368,7 +368,7 @@ AC_MSG_CHECKING([whether `$CC' accepts `-mstack-arg-probe'])
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+ void foo (void) { volatile char a[8]; a[3]; }
+ ]])])
+-[if eval "$ac_compile -S -mstack-arg-probe -Werror -o conftest.s" 2> /dev/null; then]
++[if eval "$ac_compile -S -mstack-arg-probe -o conftest.s" 2> /dev/null; then]
+ AC_MSG_RESULT([yes])
+ [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
+ rm -f conftest.s
+@@ -430,7 +430,7 @@ link_nopie_needed=no]
+ AC_MSG_CHECKING([whether linker needs disabling of PIE to work])
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[]])])
+
+-[if eval "$ac_compile -Wl,-r -nostdlib -Werror -o conftest.o" 2> /dev/null; then]
++[if eval "$ac_compile -Wl,-r -nostdlib -o conftest.o" 2> /dev/null; then]
+ AC_MSG_RESULT([no])
+ [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
+ rm -f conftest.o
+@@ -446,7 +446,7 @@ AC_DEFUN([grub_CHECK_NO_PIE],
+ [AC_MSG_CHECKING([whether linker accepts -no-pie])
+ AC_CACHE_VAL(grub_cv_cc_ld_no_pie,
+ [save_LDFLAGS="$LDFLAGS"
+-LDFLAGS="$LDFLAGS -no-pie -nostdlib -Werror"
++LDFLAGS="$LDFLAGS -no-pie -nostdlib"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_ld_no_pie=yes],
+ [grub_cv_cc_ld_no_pie=no])
+@@ -463,7 +463,7 @@ AC_DEFUN([grub_CHECK_NO_PIE_ONEWORD],
+ [AC_MSG_CHECKING([whether linker accepts -nopie])
+ AC_CACHE_VAL(grub_cv_cc_ld_no_pie_oneword,
+ [save_LDFLAGS="$LDFLAGS"
+-LDFLAGS="$LDFLAGS -nopie -nostdlib -Werror"
++LDFLAGS="$LDFLAGS -nopie -nostdlib"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_ld_no_pie_oneword=yes],
+ [grub_cv_cc_ld_no_pie_oneword=no])
+diff --git a/conf/Makefile.common b/conf/Makefile.common
+index 7ef171b2b..41772df6b 100644
+--- a/conf/Makefile.common
++++ b/conf/Makefile.common
+@@ -77,7 +77,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-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -Wno-error
+ 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 209c0fb11..1b808ce7b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -433,10 +433,10 @@ AC_CHECK_FUNCS(posix_memalign memalign getextmntent atexit)
+ AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h)
+
+ # glibc 2.25 still includes sys/sysmacros.h in sys/types.h but emits deprecation
+-# warning which causes compilation failure later with -Werror. So use -Werror here
++# warning which causes compilation failure later with. So use here
+ # as well to force proper sys/sysmacros.h detection. Used in include/grub/osdep/major.h.
+ SAVED_CFLAGS="$CFLAGS"
+-CFLAGS="$HOST_CFLAGS -Werror"
++CFLAGS="$HOST_CFLAGS"
+ AC_HEADER_MAJOR
+ CFLAGS="$SAVED_CFLAGS"
+
+@@ -464,7 +464,7 @@ AC_SUBST([LIBUTIL])
+
+ AC_CACHE_CHECK([whether -Wtrampolines work], [grub_cv_host_cc_wtrampolines], [
+ SAVED_CFLAGS="$CFLAGS"
+- CFLAGS="$HOST_CFLAGS -Wtrampolines -Werror"
++ CFLAGS="$HOST_CFLAGS -Wtrampolines"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ int va_arg_func (int fixed, va_list args);]], [[]])],
+ [grub_cv_host_cc_wtrampolines=yes],
+@@ -520,7 +520,7 @@ AC_CACHE_CHECK([which extra warnings work], [grub_cv_cc_w_extra_flags], [
+ SAVED_CFLAGS="$CFLAGS"
+ grub_cv_cc_w_extra_flags=
+ for x in $EXTRA_WARN_FLAGS; do
+- CFLAGS="$HOST_CFLAGS $x -Werror"
++ CFLAGS="$HOST_CFLAGS $x"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [flag=1], [flag=0])
+ if test x$flag = x1 ; then
+ grub_cv_cc_w_extra_flags="$grub_cv_cc_w_extra_flags $x"
+@@ -614,7 +614,7 @@ AC_CACHE_CHECK([which extra warnings work], [grub_cv_target_cc_w_extra_flags], [
+
+ grub_cv_target_cc_w_extra_flags=
+ for x in $EXTRA_WARN_FLAGS; do
+- CFLAGS="$TARGET_CFLAGS $x -Werror"
++ CFLAGS="$TARGET_CFLAGS $x"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -649,7 +649,7 @@ if test x$target_cpu = xpowerpc -o x$target_cpu = xmips; then
+ if test x"$grub_cv_target_cc_big_endian" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ != __BYTE_ORDER__)
+ #error still little endian
+@@ -684,7 +684,7 @@ elif test x$target_cpu = xmipsel; then
+ if test x"$grub_cv_target_cc_little_endian" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ == __BYTE_ORDER__)
+ #error still big endian
+@@ -722,7 +722,7 @@ if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
+ if test x"$grub_cv_target_cc_mips_o32_abi" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $arg -Werror"
++ CFLAGS="$TARGET_CFLAGS $arg"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if !defined(_ABIO32) || !defined(_MIPS_SIM) || (_MIPS_SIM != _ABIO32)
+ #error not o32 ABI
+@@ -794,7 +794,7 @@ fi
+ # on mips redirect cache flushing function to non-existant one.
+ if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
+ AC_CACHE_CHECK([whether -mflush-func=grub_red_herring works], [grub_cv_cc_mflush_func], [
+- CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring -Werror"
++ CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mflush_func=yes],
+ [grub_cv_cc_mflush_func=no])
+@@ -805,7 +805,7 @@ if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
+ fi
+
+ AC_CACHE_CHECK([whether -mno-gpopt works], [grub_cv_cc_mno_gpopt], [
+- CFLAGS="$TARGET_CFLAGS -mno-gpopt -Werror"
++ CFLAGS="$TARGET_CFLAGS -mno-gpopt"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mno_gpopt=yes],
+ [grub_cv_cc_mno_gpopt=no])
+@@ -822,7 +822,7 @@ if test "x$target_cpu" = xi386; then
+ TARGET_CFLAGS="$TARGET_CFLAGS -falign-functions=1"
+
+ AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [
+- CFLAGS="$TARGET_CFLAGS -falign-loops=1 -Werror"
++ CFLAGS="$TARGET_CFLAGS -falign-loops=1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_falign_loop=yes],
+ [grub_cv_cc_falign_loop=no])
+@@ -833,7 +833,7 @@ if test "x$target_cpu" = xi386; then
+ fi
+
+ AC_CACHE_CHECK([whether -falign-jumps works], [grub_cv_cc_falign_jumps], [
+- CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -Werror"
++ CFLAGS="$TARGET_CFLAGS -falign-jumps=1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_falign_jumps=yes],
+ [grub_cv_cc_falign_jumps=no])
+@@ -845,7 +845,7 @@ if test "x$target_cpu" = xi386; then
+ fi
+
+ AC_CACHE_CHECK([whether -freg-struct-return works], [grub_cv_cc_freg_struct_return], [
+- CFLAGS="$TARGET_CFLAGS -freg-struct-return -Werror"
++ CFLAGS="$TARGET_CFLAGS -freg-struct-return"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_freg_struct_return=yes],
+ [grub_cv_cc_freg_struct_return=no])
+@@ -863,7 +863,7 @@ fi
+
+ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ); then
+ AC_CACHE_CHECK([whether -Wa,-mx86-used-note works], [grub_cv_cc_mx86_used_note], [
+- CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no -Werror"
++ CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mx86_used_note=yes],
+ [grub_cv_cc_mx86_used_note=no])
+@@ -877,7 +877,7 @@ fi
+
+ if test "x$target_cpu" = xloongarch64; then
+ AC_CACHE_CHECK([whether _mno_explicit_relocs works], [grub_cv_cc_mno_explicit_relocs], [
+- CFLAGS="$TARGET_CFLAGS -mno-explicit-relocs -Werror"
++ CFLAGS="$TARGET_CFLAGS -mno-explicit-relocs"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mno_explicit_relocs=yes],
+ [grub_cv_cc_mno_explicit_relocs=no])
+@@ -893,7 +893,7 @@ if test "x$target_cpu" = xloongarch64; then
+ if test x"$grub_cv_target_cc_mno_relax" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -920,7 +920,7 @@ if test "x$target_cpu" = xriscv64 || test "x$target_cpu" = xriscv32; then
+ if test x"$grub_cv_target_cc_mno_relax" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -946,35 +946,35 @@ if test x"$platform" != xemu ; then
+ AC_CACHE_CHECK([for options to get soft-float], grub_cv_target_cc_soft_float, [
+ grub_cv_target_cc_soft_float=no
+ if test "x$target_cpu" = xarm64; then
+- CFLAGS="$TARGET_CFLAGS -mgeneral-regs-only -Werror"
++ CFLAGS="$TARGET_CFLAGS -mgeneral-regs-only"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-mgeneral-regs-only"], [])
+ fi
+ if test "x$target_cpu" = xriscv32; then
+- CFLAGS="$TARGET_CFLAGS -march=rv32imac -mabi=ilp32 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv32imac -mabi=ilp32"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv32imac -mabi=ilp32"], [])
+ # ISA spec version 20191213 factored out extensions Zicsr and Zifencei
+- CFLAGS="$TARGET_CFLAGS -march=rv32imac_zicsr_zifencei -mabi=ilp32 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv32imac_zicsr_zifencei -mabi=ilp32"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv32imac_zicsr_zifencei -mabi=ilp32"], [])
+ fi
+ if test "x$target_cpu" = xriscv64; then
+- CFLAGS="$TARGET_CFLAGS -march=rv64imac -mabi=lp64 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv64imac -mabi=lp64"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv64imac -mabi=lp64"], [])
+ # ISA spec version 20191213 factored out extensions Zicsr and Zifencei
+- CFLAGS="$TARGET_CFLAGS -march=rv64imac_zicsr_zifencei -mabi=lp64 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv64imac_zicsr_zifencei -mabi=lp64"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv64imac_zicsr_zifencei -mabi=lp64"], [])
+ fi
+ if test "x$target_cpu" = xia64; then
+- CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt -Werror"
++ CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-mno-inline-float-divide -mno-inline-sqrt"], [])
+ fi
+ if test "x$target_cpu" = xsh4; then
+- CFLAGS="$TARGET_CFLAGS -m4-nofpu -Werror"
++ CFLAGS="$TARGET_CFLAGS -m4-nofpu"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-m4-nofpu"], [])
+ fi
+@@ -984,7 +984,7 @@ if test x"$platform" != xemu ; then
+ if test x"$grub_cv_target_cc_soft_float" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="$cand"], [])
+ done
+@@ -1015,7 +1015,7 @@ if test x"$target_cpu" = xsparc64 ; then
+ if test x"$grub_cv_target_cc_mno_app_regs" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ CPPFLAGS="$TARGET_CPPFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_mno_app_regs="$cand"], [])
+@@ -1039,7 +1039,7 @@ if test x"$target_cpu" = xsparc64 ; then
+ break
+ fi
+ LDFLAGS="$TARGET_LDFLAGS $cand -nostdlib -static"
+- CFLAGS="$TARGET_CFLAGS -Werror"
++ CFLAGS="$TARGET_CFLAGS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -1569,7 +1569,7 @@ if test "x$target_cpu" = xarm; then
+ if test x"$grub_cv_target_cc_mno_movt" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ CPPFLAGS="$TARGET_CPPFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_mno_movt="$cand"], [])
+@@ -1581,7 +1581,7 @@ if test "x$target_cpu" = xarm; then
+ TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_mno_movt"
+ fi
+ AC_CACHE_CHECK([whether option -mthumb-interwork works], grub_cv_cc_mthumb_interwork, [
+- CFLAGS="$TARGET_CFLAGS -mthumb-interwork -Werror"
++ CFLAGS="$TARGET_CFLAGS -mthumb-interwork"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mthumb_interwork=yes],
+ [grub_cv_cc_mthumb_interwork=no])
+@@ -1595,7 +1595,7 @@ if test "x$target_cpu" = xarm; then
+ fi
+
+ AC_CACHE_CHECK([whether option -Qn works], grub_cv_target_cc_qn, [
+- CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments -Werror"
++ CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_qn=yes],
+ [grub_cv_target_cc_qn=no])])
+@@ -1748,7 +1748,7 @@ if test "$target_cpu" = arm; then
+ AC_CACHE_CHECK([for compile options to get strict alignment], [grub_cv_target_cc_strict_align], [
+ grub_cv_target_cc_strict_align=
+ for arg in -mno-unaligned-access "-Xclang -mstrict-align" -mstrict-align; do
+- CFLAGS="$TARGET_CFLAGS $arg -Werror"
++ CFLAGS="$TARGET_CFLAGS $arg"
+ LDFLAGS="$TARGET_LDFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [flag=1], [flag=0])
+ if test x"$flag" = x1; then
+@@ -1834,7 +1834,7 @@ int va_arg_func (int fixed, va_list args);]], [[]])],
+ fi
+
+ AC_CACHE_CHECK([whether -Wtrampolines work], [grub_cv_cc_wtrampolines], [
+- CFLAGS="$TARGET_CFLAGS -Wtrampolines -Werror"
++ CFLAGS="$TARGET_CFLAGS -Wtrampolines"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ int va_arg_func (int fixed, va_list args);]], [[]])],
+ [grub_cv_cc_wtrampolines=yes],
+@@ -2362,16 +2362,11 @@ AC_SUBST(END_SYMBOL)
+ AC_SUBST(PACKAGE)
+ AC_SUBST(VERSION)
+
+-AC_ARG_ENABLE([werror],
+- [AS_HELP_STRING([--disable-werror],
+- [do not use -Werror when building GRUB])])
+-if test x"$enable_werror" != xno ; then
+- TARGET_CFLAGS="$TARGET_CFLAGS -Werror"
+- HOST_CFLAGS="$HOST_CFLAGS -Werror"
+- if test "x$grub_cv_cc_target_clang" = xyes; then
+- TARGET_CFLAGS="$TARGET_CFLAGS -Wno-error=vla"
+- HOST_CFLAGS="$HOST_CFLAGS -Wno-error=vla"
+- fi
++TARGET_CFLAGS="$TARGET_CFLAGS"
++HOST_CFLAGS="$HOST_CFLAGS"
++if test "x$grub_cv_cc_target_clang" = xyes; then
++ TARGET_CFLAGS="$TARGET_CFLAGS -Wno-error"
++ HOST_CFLAGS="$HOST_CFLAGS -Wno-error"
+ fi
+
+ TARGET_CPP="$TARGET_CC -E"
+diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
+index 8577462d5..8a12861ba 100644
+--- a/grub-core/Makefile.am
++++ b/grub-core/Makefile.am
+@@ -483,7 +483,7 @@ if COND_ENABLE_EFIEMU
+ efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
+ -rm -f $@
+ -rm -f $@.bin
+- $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m32 -Wall -Werror -nostdlib -static -O2 -c -o $@.bin $<
++ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m32 -Wall -nostdlib -static -O2 -c -o $@.bin $<
+ if test "x$(TARGET_APPLE_LINKER)" = x1; then \
+ $(TARGET_OBJCONV) -felf32 -nu -nd $@.bin $@ || exit 1; \
+ rm -f $@.bin ; \
+@@ -496,10 +496,10 @@ efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
+
+ # Link format -arch,x86_64 means Apple linker
+ efiemu64_c.o: efiemu/runtime/efiemu.c
+- $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
++ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -nostdlib -Wall -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
+
+ efiemu64_s.o: efiemu/runtime/efiemu.S
+- $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
++ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -Wall -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
+
+ efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELEF)
+ -rm -f $@
+diff --git a/grub-core/lib/libgcrypt/configure b/grub-core/lib/libgcrypt/configure
+index 4a7bee2fb..b3fb1db4f 100755
+--- a/grub-core/lib/libgcrypt/configure
++++ b/grub-core/lib/libgcrypt/configure
+@@ -4705,8 +4705,8 @@ if test ${ac_cv_prog_cc_g+y}
+ then :
+ printf %s "(cached) " >&6
+ else $as_nop
+- ac_save_c_werror_flag=$ac_c_werror_flag
+- ac_c_werror_flag=yes
++ ac_save_c_werror_flag=no
++ ac_c_werror_flag=no
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -4740,7 +4740,7 @@ if ac_fn_c_try_compile "$LINENO"
+ then :
+
+ else $as_nop
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+@@ -4762,7 +4762,7 @@ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+ printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+@@ -5081,7 +5081,7 @@ else $as_nop
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+- # or remarks (even with -Werror). So we grep stderr for any message
++ # or remarks (even with). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+@@ -5857,8 +5857,8 @@ if test ${ac_cv_prog_cc_g+y}
+ then :
+ printf %s "(cached) " >&6
+ else $as_nop
+- ac_save_c_werror_flag=$ac_c_werror_flag
+- ac_c_werror_flag=yes
++ ac_save_c_werror_flag=no
++ ac_c_werror_flag=no
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -5892,7 +5892,7 @@ if ac_fn_c_try_compile "$LINENO"
+ then :
+
+ else $as_nop
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+@@ -5914,7 +5914,7 @@ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+ printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+@@ -6233,7 +6233,7 @@ else $as_nop
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+- # or remarks (even with -Werror). So we grep stderr for any message
++ # or remarks (even with). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+@@ -6500,7 +6500,7 @@ else $as_nop
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+- # or remarks (even with -Werror). So we grep stderr for any message
++ # or remarks (even with). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+@@ -17454,7 +17454,7 @@ int foo __attribute__ ((visibility ("hidden"))) = 1;
+
+ _ACEOF
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&5 2>&5 ; then
+ if grep '\.hidden.*foo' conftest.s >/dev/null 2>&1 ; then
+ if grep '\.protected.*bar' conftest.s >/dev/null 2>&1; then
+@@ -17483,7 +17483,7 @@ int foo (int x);
+
+ _ACEOF
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&5 2>&5 ; then
+ if grep '\.hidden[ _]foo' conftest.s >/dev/null 2>&1;
+ then
+@@ -17514,7 +17514,7 @@ extern int foo (int x) __asm ("xyzzy");
+
+ _ACEOF
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&5 2>&5 ; then
+ if grep 'xyzzy' conftest.s >/dev/null 2>&1 && \
+ grep 'abccb' conftest.s >/dev/null 2>&1; then
+@@ -17571,9 +17571,9 @@ fi
+
+
+ # Following attribute tests depend on warnings to cause compile to fail,
+-# so set -Werror temporarily.
++# so set temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+@@ -18275,10 +18275,10 @@ fi
+ #############################################
+
+
+-# Following tests depend on warnings to cause compile to fail, so set -Werror
++# Following tests depend on warnings to cause compile to fail, so set
+ # temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+diff --git a/grub-core/lib/libgcrypt/configure.ac b/grub-core/lib/libgcrypt/configure.ac
+index 1d06ca3b1..0a4e0286a 100644
+--- a/grub-core/lib/libgcrypt/configure.ac
++++ b/grub-core/lib/libgcrypt/configure.ac
+@@ -1007,7 +1007,7 @@ AC_CACHE_CHECK(whether the visibility attribute is supported,
+ int bar __attribute__ ((visibility ("protected"))) = 1;
+ ]])])
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then
+ if grep '\.hidden.*foo' conftest.s >/dev/null 2>&1 ; then
+ if grep '\.protected.*bar' conftest.s >/dev/null 2>&1; then
+@@ -1027,7 +1027,7 @@ if test "$gcry_cv_visibility_attribute" = "yes"; then
+ int bar (int x) { return x; }
+ ]])])
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then
+ if grep '\.hidden@<:@ _@:>@foo' conftest.s >/dev/null 2>&1;
+ then
+@@ -1049,7 +1049,7 @@ if test "$gcry_cv_visibility_attribute" = "yes"; then
+ int dfoo = 1;
+ ]])])
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then
+ if grep 'xyzzy' conftest.s >/dev/null 2>&1 && \
+ grep 'abccb' conftest.s >/dev/null 2>&1; then
+@@ -1081,9 +1081,9 @@ fi
+
+
+ # Following attribute tests depend on warnings to cause compile to fail,
+-# so set -Werror temporarily.
++# so set temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+@@ -1393,10 +1393,10 @@ fi
+ #############################################
+
+
+-# Following tests depend on warnings to cause compile to fail, so set -Werror
++# Following tests depend on warnings to cause compile to fail, so set
+ # temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+--
+2.47.3
+
diff --git a/config/module/grub/nvme/patches/0013-force-disable-werror.patch b/config/module/grub/nvme/patches/0013-force-disable-werror.patch
new file mode 100644
index 00000000..a4837f63
--- /dev/null
+++ b/config/module/grub/nvme/patches/0013-force-disable-werror.patch
@@ -0,0 +1,602 @@
+From 2adf79420721b5f7e25d657ba1a6bb60aa221bce Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Mon, 21 Sep 2026 12:13:16 +0100
+Subject: [PATCH 1/1] force-disable werror
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ Makefile.am | 4 +-
+ acinclude.m4 | 8 +--
+ conf/Makefile.common | 2 +-
+ configure.ac | 79 +++++++++++++---------------
+ grub-core/Makefile.am | 6 +--
+ grub-core/lib/libgcrypt/configure | 36 ++++++-------
+ grub-core/lib/libgcrypt/configure.ac | 14 ++---
+ 7 files changed, 72 insertions(+), 77 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 43635d5ff..0f7f55e83 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -89,11 +89,11 @@ CLEANFILES += garbage-gen$(BUILD_EXEEXT)
+ EXTRA_DIST += util/garbage-gen.c
+
+ build-grub-gen-asciih$(BUILD_EXEEXT): util/grub-gen-asciih.c
+- $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall -Werror
++ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall
+ CLEANFILES += build-grub-gen-asciih$(BUILD_EXEEXT)
+
+ build-grub-gen-widthspec$(BUILD_EXEEXT): util/grub-gen-widthspec.c
+- $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall -Werror
++ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall
+ CLEANFILES += build-grub-gen-widthspec$(BUILD_EXEEXT)
+
+ if COND_STARFIELD
+diff --git a/acinclude.m4 b/acinclude.m4
+index fa7840f09..d871737fd 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -368,7 +368,7 @@ AC_MSG_CHECKING([whether `$CC' accepts `-mstack-arg-probe'])
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+ void foo (void) { volatile char a[8]; a[3]; }
+ ]])])
+-[if eval "$ac_compile -S -mstack-arg-probe -Werror -o conftest.s" 2> /dev/null; then]
++[if eval "$ac_compile -S -mstack-arg-probe -o conftest.s" 2> /dev/null; then]
+ AC_MSG_RESULT([yes])
+ [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
+ rm -f conftest.s
+@@ -430,7 +430,7 @@ link_nopie_needed=no]
+ AC_MSG_CHECKING([whether linker needs disabling of PIE to work])
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[]])])
+
+-[if eval "$ac_compile -Wl,-r -nostdlib -Werror -o conftest.o" 2> /dev/null; then]
++[if eval "$ac_compile -Wl,-r -nostdlib -o conftest.o" 2> /dev/null; then]
+ AC_MSG_RESULT([no])
+ [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
+ rm -f conftest.o
+@@ -446,7 +446,7 @@ AC_DEFUN([grub_CHECK_NO_PIE],
+ [AC_MSG_CHECKING([whether linker accepts -no-pie])
+ AC_CACHE_VAL(grub_cv_cc_ld_no_pie,
+ [save_LDFLAGS="$LDFLAGS"
+-LDFLAGS="$LDFLAGS -no-pie -nostdlib -Werror"
++LDFLAGS="$LDFLAGS -no-pie -nostdlib"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_ld_no_pie=yes],
+ [grub_cv_cc_ld_no_pie=no])
+@@ -463,7 +463,7 @@ AC_DEFUN([grub_CHECK_NO_PIE_ONEWORD],
+ [AC_MSG_CHECKING([whether linker accepts -nopie])
+ AC_CACHE_VAL(grub_cv_cc_ld_no_pie_oneword,
+ [save_LDFLAGS="$LDFLAGS"
+-LDFLAGS="$LDFLAGS -nopie -nostdlib -Werror"
++LDFLAGS="$LDFLAGS -nopie -nostdlib"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_ld_no_pie_oneword=yes],
+ [grub_cv_cc_ld_no_pie_oneword=no])
+diff --git a/conf/Makefile.common b/conf/Makefile.common
+index 7ef171b2b..41772df6b 100644
+--- a/conf/Makefile.common
++++ b/conf/Makefile.common
+@@ -77,7 +77,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-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -Wno-error
+ 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 209c0fb11..1b808ce7b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -433,10 +433,10 @@ AC_CHECK_FUNCS(posix_memalign memalign getextmntent atexit)
+ AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h)
+
+ # glibc 2.25 still includes sys/sysmacros.h in sys/types.h but emits deprecation
+-# warning which causes compilation failure later with -Werror. So use -Werror here
++# warning which causes compilation failure later with. So use here
+ # as well to force proper sys/sysmacros.h detection. Used in include/grub/osdep/major.h.
+ SAVED_CFLAGS="$CFLAGS"
+-CFLAGS="$HOST_CFLAGS -Werror"
++CFLAGS="$HOST_CFLAGS"
+ AC_HEADER_MAJOR
+ CFLAGS="$SAVED_CFLAGS"
+
+@@ -464,7 +464,7 @@ AC_SUBST([LIBUTIL])
+
+ AC_CACHE_CHECK([whether -Wtrampolines work], [grub_cv_host_cc_wtrampolines], [
+ SAVED_CFLAGS="$CFLAGS"
+- CFLAGS="$HOST_CFLAGS -Wtrampolines -Werror"
++ CFLAGS="$HOST_CFLAGS -Wtrampolines"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ int va_arg_func (int fixed, va_list args);]], [[]])],
+ [grub_cv_host_cc_wtrampolines=yes],
+@@ -520,7 +520,7 @@ AC_CACHE_CHECK([which extra warnings work], [grub_cv_cc_w_extra_flags], [
+ SAVED_CFLAGS="$CFLAGS"
+ grub_cv_cc_w_extra_flags=
+ for x in $EXTRA_WARN_FLAGS; do
+- CFLAGS="$HOST_CFLAGS $x -Werror"
++ CFLAGS="$HOST_CFLAGS $x"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [flag=1], [flag=0])
+ if test x$flag = x1 ; then
+ grub_cv_cc_w_extra_flags="$grub_cv_cc_w_extra_flags $x"
+@@ -614,7 +614,7 @@ AC_CACHE_CHECK([which extra warnings work], [grub_cv_target_cc_w_extra_flags], [
+
+ grub_cv_target_cc_w_extra_flags=
+ for x in $EXTRA_WARN_FLAGS; do
+- CFLAGS="$TARGET_CFLAGS $x -Werror"
++ CFLAGS="$TARGET_CFLAGS $x"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -649,7 +649,7 @@ if test x$target_cpu = xpowerpc -o x$target_cpu = xmips; then
+ if test x"$grub_cv_target_cc_big_endian" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ != __BYTE_ORDER__)
+ #error still little endian
+@@ -684,7 +684,7 @@ elif test x$target_cpu = xmipsel; then
+ if test x"$grub_cv_target_cc_little_endian" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ == __BYTE_ORDER__)
+ #error still big endian
+@@ -722,7 +722,7 @@ if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
+ if test x"$grub_cv_target_cc_mips_o32_abi" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $arg -Werror"
++ CFLAGS="$TARGET_CFLAGS $arg"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if !defined(_ABIO32) || !defined(_MIPS_SIM) || (_MIPS_SIM != _ABIO32)
+ #error not o32 ABI
+@@ -794,7 +794,7 @@ fi
+ # on mips redirect cache flushing function to non-existant one.
+ if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
+ AC_CACHE_CHECK([whether -mflush-func=grub_red_herring works], [grub_cv_cc_mflush_func], [
+- CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring -Werror"
++ CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mflush_func=yes],
+ [grub_cv_cc_mflush_func=no])
+@@ -805,7 +805,7 @@ if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
+ fi
+
+ AC_CACHE_CHECK([whether -mno-gpopt works], [grub_cv_cc_mno_gpopt], [
+- CFLAGS="$TARGET_CFLAGS -mno-gpopt -Werror"
++ CFLAGS="$TARGET_CFLAGS -mno-gpopt"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mno_gpopt=yes],
+ [grub_cv_cc_mno_gpopt=no])
+@@ -822,7 +822,7 @@ if test "x$target_cpu" = xi386; then
+ TARGET_CFLAGS="$TARGET_CFLAGS -falign-functions=1"
+
+ AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [
+- CFLAGS="$TARGET_CFLAGS -falign-loops=1 -Werror"
++ CFLAGS="$TARGET_CFLAGS -falign-loops=1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_falign_loop=yes],
+ [grub_cv_cc_falign_loop=no])
+@@ -833,7 +833,7 @@ if test "x$target_cpu" = xi386; then
+ fi
+
+ AC_CACHE_CHECK([whether -falign-jumps works], [grub_cv_cc_falign_jumps], [
+- CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -Werror"
++ CFLAGS="$TARGET_CFLAGS -falign-jumps=1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_falign_jumps=yes],
+ [grub_cv_cc_falign_jumps=no])
+@@ -845,7 +845,7 @@ if test "x$target_cpu" = xi386; then
+ fi
+
+ AC_CACHE_CHECK([whether -freg-struct-return works], [grub_cv_cc_freg_struct_return], [
+- CFLAGS="$TARGET_CFLAGS -freg-struct-return -Werror"
++ CFLAGS="$TARGET_CFLAGS -freg-struct-return"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_freg_struct_return=yes],
+ [grub_cv_cc_freg_struct_return=no])
+@@ -863,7 +863,7 @@ fi
+
+ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ); then
+ AC_CACHE_CHECK([whether -Wa,-mx86-used-note works], [grub_cv_cc_mx86_used_note], [
+- CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no -Werror"
++ CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mx86_used_note=yes],
+ [grub_cv_cc_mx86_used_note=no])
+@@ -877,7 +877,7 @@ fi
+
+ if test "x$target_cpu" = xloongarch64; then
+ AC_CACHE_CHECK([whether _mno_explicit_relocs works], [grub_cv_cc_mno_explicit_relocs], [
+- CFLAGS="$TARGET_CFLAGS -mno-explicit-relocs -Werror"
++ CFLAGS="$TARGET_CFLAGS -mno-explicit-relocs"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mno_explicit_relocs=yes],
+ [grub_cv_cc_mno_explicit_relocs=no])
+@@ -893,7 +893,7 @@ if test "x$target_cpu" = xloongarch64; then
+ if test x"$grub_cv_target_cc_mno_relax" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -920,7 +920,7 @@ if test "x$target_cpu" = xriscv64 || test "x$target_cpu" = xriscv32; then
+ if test x"$grub_cv_target_cc_mno_relax" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -946,35 +946,35 @@ if test x"$platform" != xemu ; then
+ AC_CACHE_CHECK([for options to get soft-float], grub_cv_target_cc_soft_float, [
+ grub_cv_target_cc_soft_float=no
+ if test "x$target_cpu" = xarm64; then
+- CFLAGS="$TARGET_CFLAGS -mgeneral-regs-only -Werror"
++ CFLAGS="$TARGET_CFLAGS -mgeneral-regs-only"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-mgeneral-regs-only"], [])
+ fi
+ if test "x$target_cpu" = xriscv32; then
+- CFLAGS="$TARGET_CFLAGS -march=rv32imac -mabi=ilp32 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv32imac -mabi=ilp32"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv32imac -mabi=ilp32"], [])
+ # ISA spec version 20191213 factored out extensions Zicsr and Zifencei
+- CFLAGS="$TARGET_CFLAGS -march=rv32imac_zicsr_zifencei -mabi=ilp32 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv32imac_zicsr_zifencei -mabi=ilp32"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv32imac_zicsr_zifencei -mabi=ilp32"], [])
+ fi
+ if test "x$target_cpu" = xriscv64; then
+- CFLAGS="$TARGET_CFLAGS -march=rv64imac -mabi=lp64 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv64imac -mabi=lp64"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv64imac -mabi=lp64"], [])
+ # ISA spec version 20191213 factored out extensions Zicsr and Zifencei
+- CFLAGS="$TARGET_CFLAGS -march=rv64imac_zicsr_zifencei -mabi=lp64 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv64imac_zicsr_zifencei -mabi=lp64"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv64imac_zicsr_zifencei -mabi=lp64"], [])
+ fi
+ if test "x$target_cpu" = xia64; then
+- CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt -Werror"
++ CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-mno-inline-float-divide -mno-inline-sqrt"], [])
+ fi
+ if test "x$target_cpu" = xsh4; then
+- CFLAGS="$TARGET_CFLAGS -m4-nofpu -Werror"
++ CFLAGS="$TARGET_CFLAGS -m4-nofpu"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-m4-nofpu"], [])
+ fi
+@@ -984,7 +984,7 @@ if test x"$platform" != xemu ; then
+ if test x"$grub_cv_target_cc_soft_float" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="$cand"], [])
+ done
+@@ -1015,7 +1015,7 @@ if test x"$target_cpu" = xsparc64 ; then
+ if test x"$grub_cv_target_cc_mno_app_regs" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ CPPFLAGS="$TARGET_CPPFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_mno_app_regs="$cand"], [])
+@@ -1039,7 +1039,7 @@ if test x"$target_cpu" = xsparc64 ; then
+ break
+ fi
+ LDFLAGS="$TARGET_LDFLAGS $cand -nostdlib -static"
+- CFLAGS="$TARGET_CFLAGS -Werror"
++ CFLAGS="$TARGET_CFLAGS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -1569,7 +1569,7 @@ if test "x$target_cpu" = xarm; then
+ if test x"$grub_cv_target_cc_mno_movt" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ CPPFLAGS="$TARGET_CPPFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_mno_movt="$cand"], [])
+@@ -1581,7 +1581,7 @@ if test "x$target_cpu" = xarm; then
+ TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_mno_movt"
+ fi
+ AC_CACHE_CHECK([whether option -mthumb-interwork works], grub_cv_cc_mthumb_interwork, [
+- CFLAGS="$TARGET_CFLAGS -mthumb-interwork -Werror"
++ CFLAGS="$TARGET_CFLAGS -mthumb-interwork"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mthumb_interwork=yes],
+ [grub_cv_cc_mthumb_interwork=no])
+@@ -1595,7 +1595,7 @@ if test "x$target_cpu" = xarm; then
+ fi
+
+ AC_CACHE_CHECK([whether option -Qn works], grub_cv_target_cc_qn, [
+- CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments -Werror"
++ CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_qn=yes],
+ [grub_cv_target_cc_qn=no])])
+@@ -1748,7 +1748,7 @@ if test "$target_cpu" = arm; then
+ AC_CACHE_CHECK([for compile options to get strict alignment], [grub_cv_target_cc_strict_align], [
+ grub_cv_target_cc_strict_align=
+ for arg in -mno-unaligned-access "-Xclang -mstrict-align" -mstrict-align; do
+- CFLAGS="$TARGET_CFLAGS $arg -Werror"
++ CFLAGS="$TARGET_CFLAGS $arg"
+ LDFLAGS="$TARGET_LDFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [flag=1], [flag=0])
+ if test x"$flag" = x1; then
+@@ -1834,7 +1834,7 @@ int va_arg_func (int fixed, va_list args);]], [[]])],
+ fi
+
+ AC_CACHE_CHECK([whether -Wtrampolines work], [grub_cv_cc_wtrampolines], [
+- CFLAGS="$TARGET_CFLAGS -Wtrampolines -Werror"
++ CFLAGS="$TARGET_CFLAGS -Wtrampolines"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ int va_arg_func (int fixed, va_list args);]], [[]])],
+ [grub_cv_cc_wtrampolines=yes],
+@@ -2362,16 +2362,11 @@ AC_SUBST(END_SYMBOL)
+ AC_SUBST(PACKAGE)
+ AC_SUBST(VERSION)
+
+-AC_ARG_ENABLE([werror],
+- [AS_HELP_STRING([--disable-werror],
+- [do not use -Werror when building GRUB])])
+-if test x"$enable_werror" != xno ; then
+- TARGET_CFLAGS="$TARGET_CFLAGS -Werror"
+- HOST_CFLAGS="$HOST_CFLAGS -Werror"
+- if test "x$grub_cv_cc_target_clang" = xyes; then
+- TARGET_CFLAGS="$TARGET_CFLAGS -Wno-error=vla"
+- HOST_CFLAGS="$HOST_CFLAGS -Wno-error=vla"
+- fi
++TARGET_CFLAGS="$TARGET_CFLAGS"
++HOST_CFLAGS="$HOST_CFLAGS"
++if test "x$grub_cv_cc_target_clang" = xyes; then
++ TARGET_CFLAGS="$TARGET_CFLAGS -Wno-error"
++ HOST_CFLAGS="$HOST_CFLAGS -Wno-error"
+ fi
+
+ TARGET_CPP="$TARGET_CC -E"
+diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
+index 8577462d5..8a12861ba 100644
+--- a/grub-core/Makefile.am
++++ b/grub-core/Makefile.am
+@@ -483,7 +483,7 @@ if COND_ENABLE_EFIEMU
+ efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
+ -rm -f $@
+ -rm -f $@.bin
+- $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m32 -Wall -Werror -nostdlib -static -O2 -c -o $@.bin $<
++ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m32 -Wall -nostdlib -static -O2 -c -o $@.bin $<
+ if test "x$(TARGET_APPLE_LINKER)" = x1; then \
+ $(TARGET_OBJCONV) -felf32 -nu -nd $@.bin $@ || exit 1; \
+ rm -f $@.bin ; \
+@@ -496,10 +496,10 @@ efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
+
+ # Link format -arch,x86_64 means Apple linker
+ efiemu64_c.o: efiemu/runtime/efiemu.c
+- $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
++ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -nostdlib -Wall -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
+
+ efiemu64_s.o: efiemu/runtime/efiemu.S
+- $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
++ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -Wall -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
+
+ efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELEF)
+ -rm -f $@
+diff --git a/grub-core/lib/libgcrypt/configure b/grub-core/lib/libgcrypt/configure
+index 4a7bee2fb..b3fb1db4f 100755
+--- a/grub-core/lib/libgcrypt/configure
++++ b/grub-core/lib/libgcrypt/configure
+@@ -4705,8 +4705,8 @@ if test ${ac_cv_prog_cc_g+y}
+ then :
+ printf %s "(cached) " >&6
+ else $as_nop
+- ac_save_c_werror_flag=$ac_c_werror_flag
+- ac_c_werror_flag=yes
++ ac_save_c_werror_flag=no
++ ac_c_werror_flag=no
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -4740,7 +4740,7 @@ if ac_fn_c_try_compile "$LINENO"
+ then :
+
+ else $as_nop
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+@@ -4762,7 +4762,7 @@ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+ printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+@@ -5081,7 +5081,7 @@ else $as_nop
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+- # or remarks (even with -Werror). So we grep stderr for any message
++ # or remarks (even with). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+@@ -5857,8 +5857,8 @@ if test ${ac_cv_prog_cc_g+y}
+ then :
+ printf %s "(cached) " >&6
+ else $as_nop
+- ac_save_c_werror_flag=$ac_c_werror_flag
+- ac_c_werror_flag=yes
++ ac_save_c_werror_flag=no
++ ac_c_werror_flag=no
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -5892,7 +5892,7 @@ if ac_fn_c_try_compile "$LINENO"
+ then :
+
+ else $as_nop
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+@@ -5914,7 +5914,7 @@ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+ printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+@@ -6233,7 +6233,7 @@ else $as_nop
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+- # or remarks (even with -Werror). So we grep stderr for any message
++ # or remarks (even with). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+@@ -6500,7 +6500,7 @@ else $as_nop
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+- # or remarks (even with -Werror). So we grep stderr for any message
++ # or remarks (even with). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+@@ -17454,7 +17454,7 @@ int foo __attribute__ ((visibility ("hidden"))) = 1;
+
+ _ACEOF
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&5 2>&5 ; then
+ if grep '\.hidden.*foo' conftest.s >/dev/null 2>&1 ; then
+ if grep '\.protected.*bar' conftest.s >/dev/null 2>&1; then
+@@ -17483,7 +17483,7 @@ int foo (int x);
+
+ _ACEOF
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&5 2>&5 ; then
+ if grep '\.hidden[ _]foo' conftest.s >/dev/null 2>&1;
+ then
+@@ -17514,7 +17514,7 @@ extern int foo (int x) __asm ("xyzzy");
+
+ _ACEOF
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&5 2>&5 ; then
+ if grep 'xyzzy' conftest.s >/dev/null 2>&1 && \
+ grep 'abccb' conftest.s >/dev/null 2>&1; then
+@@ -17571,9 +17571,9 @@ fi
+
+
+ # Following attribute tests depend on warnings to cause compile to fail,
+-# so set -Werror temporarily.
++# so set temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+@@ -18275,10 +18275,10 @@ fi
+ #############################################
+
+
+-# Following tests depend on warnings to cause compile to fail, so set -Werror
++# Following tests depend on warnings to cause compile to fail, so set
+ # temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+diff --git a/grub-core/lib/libgcrypt/configure.ac b/grub-core/lib/libgcrypt/configure.ac
+index 1d06ca3b1..0a4e0286a 100644
+--- a/grub-core/lib/libgcrypt/configure.ac
++++ b/grub-core/lib/libgcrypt/configure.ac
+@@ -1007,7 +1007,7 @@ AC_CACHE_CHECK(whether the visibility attribute is supported,
+ int bar __attribute__ ((visibility ("protected"))) = 1;
+ ]])])
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then
+ if grep '\.hidden.*foo' conftest.s >/dev/null 2>&1 ; then
+ if grep '\.protected.*bar' conftest.s >/dev/null 2>&1; then
+@@ -1027,7 +1027,7 @@ if test "$gcry_cv_visibility_attribute" = "yes"; then
+ int bar (int x) { return x; }
+ ]])])
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then
+ if grep '\.hidden@<:@ _@:>@foo' conftest.s >/dev/null 2>&1;
+ then
+@@ -1049,7 +1049,7 @@ if test "$gcry_cv_visibility_attribute" = "yes"; then
+ int dfoo = 1;
+ ]])])
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then
+ if grep 'xyzzy' conftest.s >/dev/null 2>&1 && \
+ grep 'abccb' conftest.s >/dev/null 2>&1; then
+@@ -1081,9 +1081,9 @@ fi
+
+
+ # Following attribute tests depend on warnings to cause compile to fail,
+-# so set -Werror temporarily.
++# so set temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+@@ -1393,10 +1393,10 @@ fi
+ #############################################
+
+
+-# Following tests depend on warnings to cause compile to fail, so set -Werror
++# Following tests depend on warnings to cause compile to fail, so set
+ # temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+--
+2.47.3
+
diff --git a/config/module/grub/xhci_nvme/patches/0024-force-disable-werror.patch b/config/module/grub/xhci_nvme/patches/0024-force-disable-werror.patch
new file mode 100644
index 00000000..a4837f63
--- /dev/null
+++ b/config/module/grub/xhci_nvme/patches/0024-force-disable-werror.patch
@@ -0,0 +1,602 @@
+From 2adf79420721b5f7e25d657ba1a6bb60aa221bce Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Mon, 21 Sep 2026 12:13:16 +0100
+Subject: [PATCH 1/1] force-disable werror
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ Makefile.am | 4 +-
+ acinclude.m4 | 8 +--
+ conf/Makefile.common | 2 +-
+ configure.ac | 79 +++++++++++++---------------
+ grub-core/Makefile.am | 6 +--
+ grub-core/lib/libgcrypt/configure | 36 ++++++-------
+ grub-core/lib/libgcrypt/configure.ac | 14 ++---
+ 7 files changed, 72 insertions(+), 77 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 43635d5ff..0f7f55e83 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -89,11 +89,11 @@ CLEANFILES += garbage-gen$(BUILD_EXEEXT)
+ EXTRA_DIST += util/garbage-gen.c
+
+ build-grub-gen-asciih$(BUILD_EXEEXT): util/grub-gen-asciih.c
+- $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall -Werror
++ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall
+ CLEANFILES += build-grub-gen-asciih$(BUILD_EXEEXT)
+
+ build-grub-gen-widthspec$(BUILD_EXEEXT): util/grub-gen-widthspec.c
+- $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall -Werror
++ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall
+ CLEANFILES += build-grub-gen-widthspec$(BUILD_EXEEXT)
+
+ if COND_STARFIELD
+diff --git a/acinclude.m4 b/acinclude.m4
+index fa7840f09..d871737fd 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -368,7 +368,7 @@ AC_MSG_CHECKING([whether `$CC' accepts `-mstack-arg-probe'])
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+ void foo (void) { volatile char a[8]; a[3]; }
+ ]])])
+-[if eval "$ac_compile -S -mstack-arg-probe -Werror -o conftest.s" 2> /dev/null; then]
++[if eval "$ac_compile -S -mstack-arg-probe -o conftest.s" 2> /dev/null; then]
+ AC_MSG_RESULT([yes])
+ [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
+ rm -f conftest.s
+@@ -430,7 +430,7 @@ link_nopie_needed=no]
+ AC_MSG_CHECKING([whether linker needs disabling of PIE to work])
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[]])])
+
+-[if eval "$ac_compile -Wl,-r -nostdlib -Werror -o conftest.o" 2> /dev/null; then]
++[if eval "$ac_compile -Wl,-r -nostdlib -o conftest.o" 2> /dev/null; then]
+ AC_MSG_RESULT([no])
+ [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
+ rm -f conftest.o
+@@ -446,7 +446,7 @@ AC_DEFUN([grub_CHECK_NO_PIE],
+ [AC_MSG_CHECKING([whether linker accepts -no-pie])
+ AC_CACHE_VAL(grub_cv_cc_ld_no_pie,
+ [save_LDFLAGS="$LDFLAGS"
+-LDFLAGS="$LDFLAGS -no-pie -nostdlib -Werror"
++LDFLAGS="$LDFLAGS -no-pie -nostdlib"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_ld_no_pie=yes],
+ [grub_cv_cc_ld_no_pie=no])
+@@ -463,7 +463,7 @@ AC_DEFUN([grub_CHECK_NO_PIE_ONEWORD],
+ [AC_MSG_CHECKING([whether linker accepts -nopie])
+ AC_CACHE_VAL(grub_cv_cc_ld_no_pie_oneword,
+ [save_LDFLAGS="$LDFLAGS"
+-LDFLAGS="$LDFLAGS -nopie -nostdlib -Werror"
++LDFLAGS="$LDFLAGS -nopie -nostdlib"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_ld_no_pie_oneword=yes],
+ [grub_cv_cc_ld_no_pie_oneword=no])
+diff --git a/conf/Makefile.common b/conf/Makefile.common
+index 7ef171b2b..41772df6b 100644
+--- a/conf/Makefile.common
++++ b/conf/Makefile.common
+@@ -77,7 +77,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-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -Wno-error
+ 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 209c0fb11..1b808ce7b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -433,10 +433,10 @@ AC_CHECK_FUNCS(posix_memalign memalign getextmntent atexit)
+ AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h)
+
+ # glibc 2.25 still includes sys/sysmacros.h in sys/types.h but emits deprecation
+-# warning which causes compilation failure later with -Werror. So use -Werror here
++# warning which causes compilation failure later with. So use here
+ # as well to force proper sys/sysmacros.h detection. Used in include/grub/osdep/major.h.
+ SAVED_CFLAGS="$CFLAGS"
+-CFLAGS="$HOST_CFLAGS -Werror"
++CFLAGS="$HOST_CFLAGS"
+ AC_HEADER_MAJOR
+ CFLAGS="$SAVED_CFLAGS"
+
+@@ -464,7 +464,7 @@ AC_SUBST([LIBUTIL])
+
+ AC_CACHE_CHECK([whether -Wtrampolines work], [grub_cv_host_cc_wtrampolines], [
+ SAVED_CFLAGS="$CFLAGS"
+- CFLAGS="$HOST_CFLAGS -Wtrampolines -Werror"
++ CFLAGS="$HOST_CFLAGS -Wtrampolines"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ int va_arg_func (int fixed, va_list args);]], [[]])],
+ [grub_cv_host_cc_wtrampolines=yes],
+@@ -520,7 +520,7 @@ AC_CACHE_CHECK([which extra warnings work], [grub_cv_cc_w_extra_flags], [
+ SAVED_CFLAGS="$CFLAGS"
+ grub_cv_cc_w_extra_flags=
+ for x in $EXTRA_WARN_FLAGS; do
+- CFLAGS="$HOST_CFLAGS $x -Werror"
++ CFLAGS="$HOST_CFLAGS $x"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [flag=1], [flag=0])
+ if test x$flag = x1 ; then
+ grub_cv_cc_w_extra_flags="$grub_cv_cc_w_extra_flags $x"
+@@ -614,7 +614,7 @@ AC_CACHE_CHECK([which extra warnings work], [grub_cv_target_cc_w_extra_flags], [
+
+ grub_cv_target_cc_w_extra_flags=
+ for x in $EXTRA_WARN_FLAGS; do
+- CFLAGS="$TARGET_CFLAGS $x -Werror"
++ CFLAGS="$TARGET_CFLAGS $x"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -649,7 +649,7 @@ if test x$target_cpu = xpowerpc -o x$target_cpu = xmips; then
+ if test x"$grub_cv_target_cc_big_endian" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ != __BYTE_ORDER__)
+ #error still little endian
+@@ -684,7 +684,7 @@ elif test x$target_cpu = xmipsel; then
+ if test x"$grub_cv_target_cc_little_endian" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ == __BYTE_ORDER__)
+ #error still big endian
+@@ -722,7 +722,7 @@ if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
+ if test x"$grub_cv_target_cc_mips_o32_abi" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $arg -Werror"
++ CFLAGS="$TARGET_CFLAGS $arg"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if !defined(_ABIO32) || !defined(_MIPS_SIM) || (_MIPS_SIM != _ABIO32)
+ #error not o32 ABI
+@@ -794,7 +794,7 @@ fi
+ # on mips redirect cache flushing function to non-existant one.
+ if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
+ AC_CACHE_CHECK([whether -mflush-func=grub_red_herring works], [grub_cv_cc_mflush_func], [
+- CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring -Werror"
++ CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mflush_func=yes],
+ [grub_cv_cc_mflush_func=no])
+@@ -805,7 +805,7 @@ if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
+ fi
+
+ AC_CACHE_CHECK([whether -mno-gpopt works], [grub_cv_cc_mno_gpopt], [
+- CFLAGS="$TARGET_CFLAGS -mno-gpopt -Werror"
++ CFLAGS="$TARGET_CFLAGS -mno-gpopt"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mno_gpopt=yes],
+ [grub_cv_cc_mno_gpopt=no])
+@@ -822,7 +822,7 @@ if test "x$target_cpu" = xi386; then
+ TARGET_CFLAGS="$TARGET_CFLAGS -falign-functions=1"
+
+ AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [
+- CFLAGS="$TARGET_CFLAGS -falign-loops=1 -Werror"
++ CFLAGS="$TARGET_CFLAGS -falign-loops=1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_falign_loop=yes],
+ [grub_cv_cc_falign_loop=no])
+@@ -833,7 +833,7 @@ if test "x$target_cpu" = xi386; then
+ fi
+
+ AC_CACHE_CHECK([whether -falign-jumps works], [grub_cv_cc_falign_jumps], [
+- CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -Werror"
++ CFLAGS="$TARGET_CFLAGS -falign-jumps=1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_falign_jumps=yes],
+ [grub_cv_cc_falign_jumps=no])
+@@ -845,7 +845,7 @@ if test "x$target_cpu" = xi386; then
+ fi
+
+ AC_CACHE_CHECK([whether -freg-struct-return works], [grub_cv_cc_freg_struct_return], [
+- CFLAGS="$TARGET_CFLAGS -freg-struct-return -Werror"
++ CFLAGS="$TARGET_CFLAGS -freg-struct-return"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_freg_struct_return=yes],
+ [grub_cv_cc_freg_struct_return=no])
+@@ -863,7 +863,7 @@ fi
+
+ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ); then
+ AC_CACHE_CHECK([whether -Wa,-mx86-used-note works], [grub_cv_cc_mx86_used_note], [
+- CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no -Werror"
++ CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mx86_used_note=yes],
+ [grub_cv_cc_mx86_used_note=no])
+@@ -877,7 +877,7 @@ fi
+
+ if test "x$target_cpu" = xloongarch64; then
+ AC_CACHE_CHECK([whether _mno_explicit_relocs works], [grub_cv_cc_mno_explicit_relocs], [
+- CFLAGS="$TARGET_CFLAGS -mno-explicit-relocs -Werror"
++ CFLAGS="$TARGET_CFLAGS -mno-explicit-relocs"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mno_explicit_relocs=yes],
+ [grub_cv_cc_mno_explicit_relocs=no])
+@@ -893,7 +893,7 @@ if test "x$target_cpu" = xloongarch64; then
+ if test x"$grub_cv_target_cc_mno_relax" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -920,7 +920,7 @@ if test "x$target_cpu" = xriscv64 || test "x$target_cpu" = xriscv32; then
+ if test x"$grub_cv_target_cc_mno_relax" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -946,35 +946,35 @@ if test x"$platform" != xemu ; then
+ AC_CACHE_CHECK([for options to get soft-float], grub_cv_target_cc_soft_float, [
+ grub_cv_target_cc_soft_float=no
+ if test "x$target_cpu" = xarm64; then
+- CFLAGS="$TARGET_CFLAGS -mgeneral-regs-only -Werror"
++ CFLAGS="$TARGET_CFLAGS -mgeneral-regs-only"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-mgeneral-regs-only"], [])
+ fi
+ if test "x$target_cpu" = xriscv32; then
+- CFLAGS="$TARGET_CFLAGS -march=rv32imac -mabi=ilp32 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv32imac -mabi=ilp32"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv32imac -mabi=ilp32"], [])
+ # ISA spec version 20191213 factored out extensions Zicsr and Zifencei
+- CFLAGS="$TARGET_CFLAGS -march=rv32imac_zicsr_zifencei -mabi=ilp32 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv32imac_zicsr_zifencei -mabi=ilp32"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv32imac_zicsr_zifencei -mabi=ilp32"], [])
+ fi
+ if test "x$target_cpu" = xriscv64; then
+- CFLAGS="$TARGET_CFLAGS -march=rv64imac -mabi=lp64 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv64imac -mabi=lp64"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv64imac -mabi=lp64"], [])
+ # ISA spec version 20191213 factored out extensions Zicsr and Zifencei
+- CFLAGS="$TARGET_CFLAGS -march=rv64imac_zicsr_zifencei -mabi=lp64 -Werror"
++ CFLAGS="$TARGET_CFLAGS -march=rv64imac_zicsr_zifencei -mabi=lp64"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-march=rv64imac_zicsr_zifencei -mabi=lp64"], [])
+ fi
+ if test "x$target_cpu" = xia64; then
+- CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt -Werror"
++ CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-mno-inline-float-divide -mno-inline-sqrt"], [])
+ fi
+ if test "x$target_cpu" = xsh4; then
+- CFLAGS="$TARGET_CFLAGS -m4-nofpu -Werror"
++ CFLAGS="$TARGET_CFLAGS -m4-nofpu"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="-m4-nofpu"], [])
+ fi
+@@ -984,7 +984,7 @@ if test x"$platform" != xemu ; then
+ if test x"$grub_cv_target_cc_soft_float" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_soft_float="$cand"], [])
+ done
+@@ -1015,7 +1015,7 @@ if test x"$target_cpu" = xsparc64 ; then
+ if test x"$grub_cv_target_cc_mno_app_regs" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ CPPFLAGS="$TARGET_CPPFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_mno_app_regs="$cand"], [])
+@@ -1039,7 +1039,7 @@ if test x"$target_cpu" = xsparc64 ; then
+ break
+ fi
+ LDFLAGS="$TARGET_LDFLAGS $cand -nostdlib -static"
+- CFLAGS="$TARGET_CFLAGS -Werror"
++ CFLAGS="$TARGET_CFLAGS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ asm (".globl start; start:");
+ void __main (void);
+@@ -1569,7 +1569,7 @@ if test "x$target_cpu" = xarm; then
+ if test x"$grub_cv_target_cc_mno_movt" != xno ; then
+ break
+ fi
+- CFLAGS="$TARGET_CFLAGS $cand -Werror"
++ CFLAGS="$TARGET_CFLAGS $cand"
+ CPPFLAGS="$TARGET_CPPFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_mno_movt="$cand"], [])
+@@ -1581,7 +1581,7 @@ if test "x$target_cpu" = xarm; then
+ TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_mno_movt"
+ fi
+ AC_CACHE_CHECK([whether option -mthumb-interwork works], grub_cv_cc_mthumb_interwork, [
+- CFLAGS="$TARGET_CFLAGS -mthumb-interwork -Werror"
++ CFLAGS="$TARGET_CFLAGS -mthumb-interwork"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mthumb_interwork=yes],
+ [grub_cv_cc_mthumb_interwork=no])
+@@ -1595,7 +1595,7 @@ if test "x$target_cpu" = xarm; then
+ fi
+
+ AC_CACHE_CHECK([whether option -Qn works], grub_cv_target_cc_qn, [
+- CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments -Werror"
++ CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_qn=yes],
+ [grub_cv_target_cc_qn=no])])
+@@ -1748,7 +1748,7 @@ if test "$target_cpu" = arm; then
+ AC_CACHE_CHECK([for compile options to get strict alignment], [grub_cv_target_cc_strict_align], [
+ grub_cv_target_cc_strict_align=
+ for arg in -mno-unaligned-access "-Xclang -mstrict-align" -mstrict-align; do
+- CFLAGS="$TARGET_CFLAGS $arg -Werror"
++ CFLAGS="$TARGET_CFLAGS $arg"
+ LDFLAGS="$TARGET_LDFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [flag=1], [flag=0])
+ if test x"$flag" = x1; then
+@@ -1834,7 +1834,7 @@ int va_arg_func (int fixed, va_list args);]], [[]])],
+ fi
+
+ AC_CACHE_CHECK([whether -Wtrampolines work], [grub_cv_cc_wtrampolines], [
+- CFLAGS="$TARGET_CFLAGS -Wtrampolines -Werror"
++ CFLAGS="$TARGET_CFLAGS -Wtrampolines"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ int va_arg_func (int fixed, va_list args);]], [[]])],
+ [grub_cv_cc_wtrampolines=yes],
+@@ -2362,16 +2362,11 @@ AC_SUBST(END_SYMBOL)
+ AC_SUBST(PACKAGE)
+ AC_SUBST(VERSION)
+
+-AC_ARG_ENABLE([werror],
+- [AS_HELP_STRING([--disable-werror],
+- [do not use -Werror when building GRUB])])
+-if test x"$enable_werror" != xno ; then
+- TARGET_CFLAGS="$TARGET_CFLAGS -Werror"
+- HOST_CFLAGS="$HOST_CFLAGS -Werror"
+- if test "x$grub_cv_cc_target_clang" = xyes; then
+- TARGET_CFLAGS="$TARGET_CFLAGS -Wno-error=vla"
+- HOST_CFLAGS="$HOST_CFLAGS -Wno-error=vla"
+- fi
++TARGET_CFLAGS="$TARGET_CFLAGS"
++HOST_CFLAGS="$HOST_CFLAGS"
++if test "x$grub_cv_cc_target_clang" = xyes; then
++ TARGET_CFLAGS="$TARGET_CFLAGS -Wno-error"
++ HOST_CFLAGS="$HOST_CFLAGS -Wno-error"
+ fi
+
+ TARGET_CPP="$TARGET_CC -E"
+diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
+index 8577462d5..8a12861ba 100644
+--- a/grub-core/Makefile.am
++++ b/grub-core/Makefile.am
+@@ -483,7 +483,7 @@ if COND_ENABLE_EFIEMU
+ efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
+ -rm -f $@
+ -rm -f $@.bin
+- $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m32 -Wall -Werror -nostdlib -static -O2 -c -o $@.bin $<
++ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m32 -Wall -nostdlib -static -O2 -c -o $@.bin $<
+ if test "x$(TARGET_APPLE_LINKER)" = x1; then \
+ $(TARGET_OBJCONV) -felf32 -nu -nd $@.bin $@ || exit 1; \
+ rm -f $@.bin ; \
+@@ -496,10 +496,10 @@ efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
+
+ # Link format -arch,x86_64 means Apple linker
+ efiemu64_c.o: efiemu/runtime/efiemu.c
+- $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
++ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -nostdlib -Wall -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
+
+ efiemu64_s.o: efiemu/runtime/efiemu.S
+- $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
++ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -Wall -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
+
+ efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELEF)
+ -rm -f $@
+diff --git a/grub-core/lib/libgcrypt/configure b/grub-core/lib/libgcrypt/configure
+index 4a7bee2fb..b3fb1db4f 100755
+--- a/grub-core/lib/libgcrypt/configure
++++ b/grub-core/lib/libgcrypt/configure
+@@ -4705,8 +4705,8 @@ if test ${ac_cv_prog_cc_g+y}
+ then :
+ printf %s "(cached) " >&6
+ else $as_nop
+- ac_save_c_werror_flag=$ac_c_werror_flag
+- ac_c_werror_flag=yes
++ ac_save_c_werror_flag=no
++ ac_c_werror_flag=no
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -4740,7 +4740,7 @@ if ac_fn_c_try_compile "$LINENO"
+ then :
+
+ else $as_nop
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+@@ -4762,7 +4762,7 @@ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+ printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+@@ -5081,7 +5081,7 @@ else $as_nop
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+- # or remarks (even with -Werror). So we grep stderr for any message
++ # or remarks (even with). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+@@ -5857,8 +5857,8 @@ if test ${ac_cv_prog_cc_g+y}
+ then :
+ printf %s "(cached) " >&6
+ else $as_nop
+- ac_save_c_werror_flag=$ac_c_werror_flag
+- ac_c_werror_flag=yes
++ ac_save_c_werror_flag=no
++ ac_c_werror_flag=no
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -5892,7 +5892,7 @@ if ac_fn_c_try_compile "$LINENO"
+ then :
+
+ else $as_nop
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+@@ -5914,7 +5914,7 @@ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+- ac_c_werror_flag=$ac_save_c_werror_flag
++ ac_c_werror_flag=no
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+ printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+@@ -6233,7 +6233,7 @@ else $as_nop
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+- # or remarks (even with -Werror). So we grep stderr for any message
++ # or remarks (even with). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+@@ -6500,7 +6500,7 @@ else $as_nop
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+- # or remarks (even with -Werror). So we grep stderr for any message
++ # or remarks (even with). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+@@ -17454,7 +17454,7 @@ int foo __attribute__ ((visibility ("hidden"))) = 1;
+
+ _ACEOF
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&5 2>&5 ; then
+ if grep '\.hidden.*foo' conftest.s >/dev/null 2>&1 ; then
+ if grep '\.protected.*bar' conftest.s >/dev/null 2>&1; then
+@@ -17483,7 +17483,7 @@ int foo (int x);
+
+ _ACEOF
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&5 2>&5 ; then
+ if grep '\.hidden[ _]foo' conftest.s >/dev/null 2>&1;
+ then
+@@ -17514,7 +17514,7 @@ extern int foo (int x) __asm ("xyzzy");
+
+ _ACEOF
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&5 2>&5 ; then
+ if grep 'xyzzy' conftest.s >/dev/null 2>&1 && \
+ grep 'abccb' conftest.s >/dev/null 2>&1; then
+@@ -17571,9 +17571,9 @@ fi
+
+
+ # Following attribute tests depend on warnings to cause compile to fail,
+-# so set -Werror temporarily.
++# so set temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+@@ -18275,10 +18275,10 @@ fi
+ #############################################
+
+
+-# Following tests depend on warnings to cause compile to fail, so set -Werror
++# Following tests depend on warnings to cause compile to fail, so set
+ # temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+diff --git a/grub-core/lib/libgcrypt/configure.ac b/grub-core/lib/libgcrypt/configure.ac
+index 1d06ca3b1..0a4e0286a 100644
+--- a/grub-core/lib/libgcrypt/configure.ac
++++ b/grub-core/lib/libgcrypt/configure.ac
+@@ -1007,7 +1007,7 @@ AC_CACHE_CHECK(whether the visibility attribute is supported,
+ int bar __attribute__ ((visibility ("protected"))) = 1;
+ ]])])
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then
+ if grep '\.hidden.*foo' conftest.s >/dev/null 2>&1 ; then
+ if grep '\.protected.*bar' conftest.s >/dev/null 2>&1; then
+@@ -1027,7 +1027,7 @@ if test "$gcry_cv_visibility_attribute" = "yes"; then
+ int bar (int x) { return x; }
+ ]])])
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then
+ if grep '\.hidden@<:@ _@:>@foo' conftest.s >/dev/null 2>&1;
+ then
+@@ -1049,7 +1049,7 @@ if test "$gcry_cv_visibility_attribute" = "yes"; then
+ int dfoo = 1;
+ ]])])
+
+- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
++ if ${CC-cc} -S conftest.c -o conftest.s \
+ 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then
+ if grep 'xyzzy' conftest.s >/dev/null 2>&1 && \
+ grep 'abccb' conftest.s >/dev/null 2>&1; then
+@@ -1081,9 +1081,9 @@ fi
+
+
+ # Following attribute tests depend on warnings to cause compile to fail,
+-# so set -Werror temporarily.
++# so set temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+@@ -1393,10 +1393,10 @@ fi
+ #############################################
+
+
+-# Following tests depend on warnings to cause compile to fail, so set -Werror
++# Following tests depend on warnings to cause compile to fail, so set
+ # temporarily.
+ _gcc_cflags_save=$CFLAGS
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+
+
+ #
+--
+2.47.3
+