summaryrefslogtreecommitdiff
path: root/config/submodule/coreboot/default/cmocka
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-09-21 11:01:45 +0100
committerLeah Rowe <leah@libreboot.org>2026-09-21 11:23:03 +0100
commit0a8b27e8a61f4ff4dc04fd52bcb0e6ba63829c09 (patch)
tree35a2f27f1dea4ab074a8163e6a79a7a486ff959b /config/submodule/coreboot/default/cmocka
parent329319b66569f9bdde30ccc1d0f1d27e87a8dbe8 (diff)
coreboot: remove Werror everywhere
NOTE; don't need to patch xgcc, because coreboot passes --disable-werror already, on all versions of coreboot. this patch should now make builds more reliable, reducing the chance that newer linux distros and toolchains will break lbmk in the future. (testing needed on archlinux as always) Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/submodule/coreboot/default/cmocka')
-rw-r--r--config/submodule/coreboot/default/cmocka/patches/0001-disable-Werror.patch74
1 files changed, 74 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
+