summaryrefslogtreecommitdiff
path: root/config/submodule/coreboot/i945/vboot/patches/0001-don-t-treat-warnings-as-errors.patch
blob: 91f2eee87b059e408dc10bc1bbe6f93d6e66d724 (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
From 59c393f2a928770c2d397bc93d388543c2d94dab Mon Sep 17 00:00:00 2001
From: Leah Rowe <info@minifree.org>
Date: Tue, 21 May 2024 23:22:50 +0100
Subject: [PATCH 1/1] don't treat warnings as errors

Signed-off-by: Leah Rowe <info@minifree.org>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index a4390522..d2ec9aa3 100644
--- a/Makefile
+++ b/Makefile
@@ -125,7 +125,7 @@ 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
+WERROR := -Wno-error -w
 FIRMWARE_FLAGS := -nostdinc -ffreestanding -fno-builtin -fno-stack-protector
 COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \
 	-Wundef -Wmissing-prototypes -Wno-trigraphs -Wredundant-decls -Wshadow \
@@ -162,7 +162,7 @@ CFLAGS += -std=gnu11
 # 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 -Wno-error -w $(1) -xc -c - -o /dev/null \
 	>/dev/null 2>&1 && echo "$(1)")
 
 COMMON_FLAGS += $(call test_ccflag,-Wimplicit-fallthrough)
-- 
2.39.2