diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-04-23 20:29:38 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-04-23 21:55:11 +0100 |
| commit | 2ecfe63b5f96331d4d7b8afbee07ba9dbd69ef5d (patch) | |
| tree | 24e4451764e1ad60b7f776476230646c4f4d73f8 /config/submodule/coreboot/default/cmocka | |
| parent | fedeb6ecd8b5f3ed79dad754e452aecf88cbdde2 (diff) | |
coreboot: never, ever use Werror
not even once
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.patch | 80 |
1 files changed, 80 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..b84e6261 --- /dev/null +++ b/config/submodule/coreboot/default/cmocka/patches/0001-disable-werror.patch @@ -0,0 +1,80 @@ +From 228447a166be2743cc377c99968cad0df1cb4909 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Thu, 23 Apr 2026 20:45:47 +0100 +Subject: [PATCH 1/1] disable werror + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + .ycm_extra_conf.py | 1 - + CompilerChecks.cmake | 23 ----------------------- + 2 files changed, 24 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..5fd39d8 100644 +--- a/CompilerChecks.cmake ++++ b/CompilerChecks.cmake +@@ -2,20 +2,6 @@ include(AddCCompilerFlag) + include(CheckCCompilerFlagSSP) + + if (UNIX) +- # +- # Check for -Werror turned on if possible +- # +- # 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) + add_c_compiler_flag("-Wall" SUPPORTED_COMPILER_FLAGS) +@@ -23,20 +9,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 +25,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 + |
