summaryrefslogtreecommitdiff
path: root/config/submodule/edk2/default/vboot/patches/0003-remove-Werror.patch
blob: fbc609401e47e5212e1544cd8fc3d34010349841 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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