summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
blob: ba7681b9833e45f143b23b7c9793a88cb9abf3f5 (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
59
60
61
62
63
From 6b33adfa438e35b6a37cfb0364274370ef4f9fc1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 23 Dec 2020 18:00:59 +0000
Subject: [PATCH] Do not use -Werror as it fails with newer clang 11+

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 GNUmakefile | 1 -
 1 file changed, 1 deletion(-)

--- a/GNUmakefile
+++ b/GNUmakefile
@@ -91,12 +91,13 @@ comma := ,
 # If supported by COMPILER_gcc, add given flags to CFLAGS_gcc.
 # Example usage:
 #   $(eval $(call CHECK_CFLAGS_gcc,-fasynchronous-unwind-tables))
-define CHECK_CFLAGS_gcc
-CFLAGS_gcc += $$(if $$(shell if $$(COMPILER_gcc) $(1) -x c -o compile-check.gcc-o -c - < /dev/null > /dev/null 2>&1; then echo yes; else :; fi; rm -f compile-check.gcc-o > /dev/null 2>&1),$(1))
-endef
 
 COMPILER_gcc = gcc
 LINKER_gcc = gcc
+ifneq ($(COMPILER_gcc),no)
+define CHECK_CFLAGS_gcc
+CFLAGS_gcc += $$(if $$(shell if $$(COMPILER_gcc) $(1) -x c -o compile-check.gcc-o -c - < /dev/null > /dev/null 2>&1; then echo yes; else :; fi; rm -f compile-check.gcc-o > /dev/null 2>&1),$(1))
+endef
 CPPFLAGS_gcc =
 CFLAGS_gcc =
 CFLAGS_gcc += -std=gnu99 -pedantic
@@ -113,30 +114,24 @@ CFLAGS_gcc += -save-temps=obj
 LDFLAGS_gcc =
 LIBS_gcc =
 
-ifneq ($(call pathsearch,$(COMPILER_gcc)),)
-ifneq ($(COMPILER_gcc)),no)
 COMPILERS += gcc
 endif
-endif
 
 COMPILER_clang = clang
 LINKER_clang = clang
+
+ifneq ($(COMPILER_clang),no)
 CPPFLAGS_clang =
 CFLAGS_clang += -Wall -Wextra
 CFLAGS_clang += -Weverything
 CFLAGS_clang += -Wno-padded
 CFLAGS_clang += -std=gnu99 -pedantic
-CFLAGS_clang += -Werror
-CFLAGS_clang += -fsanitize=undefined
 CFLAGS_clang += -O -g
 LDFLAGS_clang =
 LIBS_clang =
 
-ifneq ($(call pathsearch,$(COMPILER_clang)),)
-ifneq ($(COMPILER_clang),no)
 COMPILERS += clang
 endif
-endif
 
 
 ########################################################################