summaryrefslogtreecommitdiff
path: root/config/submodule/coreboot/default
diff options
context:
space:
mode:
Diffstat (limited to 'config/submodule/coreboot/default')
-rw-r--r--config/submodule/coreboot/default/cmocka/patches/0001-disable-Werror.patch74
-rw-r--r--config/submodule/coreboot/default/libhwbase/0001-remove-Werror.patch26
-rw-r--r--config/submodule/coreboot/default/vboot/patches/0003-remove-Werror.patch58
3 files changed, 158 insertions, 0 deletions
diff --git a/config/submodule/coreboot/default/cmocka/patches/0001-disable-Werror.patch b/config/submodule/coreboot/default/cmocka/patches/0001-disable-Werror.patch
new file mode 100644
index 00000000..8bf8bf10
--- /dev/null
+++ b/config/submodule/coreboot/default/cmocka/patches/0001-disable-Werror.patch
@@ -0,0 +1,74 @@
+From 0762c4d3ad28239550f39793946c00a4866a797f Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Mon, 21 Sep 2026 10:49:57 +0100
+Subject: [PATCH 1/1] disable -Werror
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ .ycm_extra_conf.py | 1 -
+ CompilerChecks.cmake | 17 -----------------
+ 2 files changed, 18 deletions(-)
+
+diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py
+index 8305a8b..538bc2b 100644
+--- a/.ycm_extra_conf.py
++++ b/.ycm_extra_conf.py
+@@ -4,7 +4,6 @@ import ycm_core
+ flags = [
+ '-Wall',
+ '-Wextra',
+-'-Werror',
+ '-x', 'c',
+ '-Iinclude',
+ ]
+diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake
+index e39cc1d..9ee5462 100644
+--- a/CompilerChecks.cmake
++++ b/CompilerChecks.cmake
+@@ -7,14 +7,6 @@ if (UNIX)
+ #
+ # This will prevent that compiler flags are detected incorrectly.
+ #
+- check_c_compiler_flag("-Werror" REQUIRED_FLAGS_WERROR)
+- if (REQUIRED_FLAGS_WERROR)
+- set(CMAKE_REQUIRED_FLAGS "-Werror")
+-
+- if (PICKY_DEVELOPER)
+- list(APPEND SUPPORTED_COMPILER_FLAGS "-Werror")
+- endif()
+- endif()
+
+ add_c_compiler_flag("-std=gnu99" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wpedantic" SUPPORTED_COMPILER_FLAGS)
+@@ -23,20 +15,12 @@ if (UNIX)
+ add_c_compiler_flag("-Wmissing-prototypes" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wcast-align" SUPPORTED_COMPILER_FLAGS)
+ #add_c_compiler_flag("-Wcast-qual" SUPPORTED_COMPILER_FLAGS)
+- add_c_compiler_flag("-Werror=address" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wstrict-prototypes" SUPPORTED_COMPILER_FLAGS)
+- add_c_compiler_flag("-Werror=strict-prototypes" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wwrite-strings" SUPPORTED_COMPILER_FLAGS)
+- add_c_compiler_flag("-Werror=write-strings" SUPPORTED_COMPILER_FLAGS)
+- add_c_compiler_flag("-Werror-implicit-function-declaration" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wpointer-arith" SUPPORTED_COMPILER_FLAGS)
+- add_c_compiler_flag("-Werror=pointer-arith" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wreturn-type" SUPPORTED_COMPILER_FLAGS)
+- add_c_compiler_flag("-Werror=return-type" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wuninitialized" SUPPORTED_COMPILER_FLAGS)
+- add_c_compiler_flag("-Werror=uninitialized" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wimplicit-fallthrough" SUPPORTED_COMPILER_FLAGS)
+- add_c_compiler_flag("-Werror=strict-overflow" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wstrict-overflow=2" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wno-format-zero-length" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wmissing-field-initializers" SUPPORTED_COMPILER_FLAGS)
+@@ -47,7 +31,6 @@ if (UNIX)
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wformat")
+ endif()
+ add_c_compiler_flag("-Wformat-security" SUPPORTED_COMPILER_FLAGS)
+- add_c_compiler_flag("-Werror=format-security" SUPPORTED_COMPILER_FLAGS)
+
+ # Allow zero for a variadic macro argument
+ string(TOLOWER "${CMAKE_C_COMPILER_ID}" _C_COMPILER_ID)
+--
+2.47.3
+
diff --git a/config/submodule/coreboot/default/libhwbase/0001-remove-Werror.patch b/config/submodule/coreboot/default/libhwbase/0001-remove-Werror.patch
new file mode 100644
index 00000000..8f0eba58
--- /dev/null
+++ b/config/submodule/coreboot/default/libhwbase/0001-remove-Werror.patch
@@ -0,0 +1,26 @@
+From 5453dc70cdf327e5b4228fbce34b03107936628f Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Mon, 21 Sep 2026 10:58:18 +0100
+Subject: [PATCH 1/1] remove -Werror
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index e8d864e..9c10fb6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -43,7 +43,7 @@ endif
+ CC = $(CROSS_COMPILE)gcc
+ GNATBIND = $(CROSS_COMPILE)gnatbind
+
+-CFLAGS += -Wuninitialized -Wall -Werror
++CFLAGS += -Wuninitialized -Wall
+ CFLAGS += -pipe -g
+ CFLAGS += -Wstrict-aliasing -Wshadow
+ CFLAGS += -fno-common -fomit-frame-pointer
+--
+2.47.3
+
diff --git a/config/submodule/coreboot/default/vboot/patches/0003-remove-Werror.patch b/config/submodule/coreboot/default/vboot/patches/0003-remove-Werror.patch
new file mode 100644
index 00000000..fbc60940
--- /dev/null
+++ b/config/submodule/coreboot/default/vboot/patches/0003-remove-Werror.patch
@@ -0,0 +1,58 @@
+From f71d1e0981fa3a9ea8201cac97631486a90d5ce4 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Mon, 21 Sep 2026 11:01:00 +0100
+Subject: [PATCH 1/1] remove -Werror
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ Android.bp | 1 -
+ Makefile | 6 ++----
+ 2 files changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/Android.bp b/Android.bp
+index dec72cc8..1974a1a2 100644
+--- a/Android.bp
++++ b/Android.bp
+@@ -9,7 +9,6 @@ cc_defaults {
+
+ cflags: [
+ "-Wall",
+- "-Werror",
+ "-Wstrict-prototypes",
+ "-Wtype-limits",
+ "-Wundef",
+diff --git a/Makefile b/Makefile
+index 67af60d4..4243a03a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -113,9 +113,8 @@ endif
+ # Provide default CC and CFLAGS for firmware builds; if you have any -D flags,
+ # please add them after this point (e.g., -DVBOOT_DEBUG).
+ DEBUG_FLAGS := $(if $(filter-out 0,${DEBUG}),-g -Og,-g -Os)
+-WERROR := -Werror
+ FIRMWARE_FLAGS := -nostdinc -ffreestanding -fno-builtin -fno-stack-protector
+-COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \
++COMMON_FLAGS := -pipe -Wall -Wstrict-prototypes -Wtype-limits \
+ -Wundef -Wmissing-prototypes -Wno-trigraphs -Wredundant-decls -Wshadow \
+ -Wwrite-strings -Wstrict-aliasing -Wdate-time \
+ -Wint-conversion -ffunction-sections -fdata-sections \
+@@ -127,7 +126,7 @@ COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \
+ # returns: $(1) if compiler was successful, empty string otherwise
+ test_ccflag = $(shell \
+ printf "$(2)\nvoid _start(void) {}\n" | \
+- $(CC) -nostdlib -Werror $(1) -xc -c - -o /dev/null \
++ $(CC) -nostdlib $(1) -xc -c - -o /dev/null \
+ >/dev/null 2>&1 && echo "$(1)")
+
+ COMMON_FLAGS += $(call test_ccflag,-Wimplicit-fallthrough)
+@@ -499,7 +498,6 @@ UTILLIB = ${BUILD}/libvboot_util.a
+ # Avoid build failures outside the chroot on Ubuntu 2022.04
+ # e.g.:
+ # host/lib/host_key2.c:103:17: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0
+-# [-Werror=deprecated-declarations]
+ ifeq ($(OPENSSL_VERSION),3)
+ ${UTILLIB}: CFLAGS += -Wno-error=deprecated-declarations
+ endif
+--
+2.47.3
+