summaryrefslogtreecommitdiffstats
path: root/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch')
-rw-r--r--recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch57
1 files changed, 0 insertions, 57 deletions
diff --git a/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch b/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch
deleted file mode 100644
index 9c6b1069..00000000
--- a/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From 591461d6efe51989b4a7f4e875cdf37505eba360 Mon Sep 17 00:00:00 2001
2From: Andrey Zhizhikin <andrey.z@gmail.com>
3Date: Thu, 4 Jun 2020 19:24:05 +0000
4Subject: [PATCH] flags: do not override CFLAGS from host
5
6Some build systems set CFLAGS in environment before the build, but they
7got overridden by CFLAGS immediate assignment operator.
8
9Replace immediate assignment with append directive and use override
10directive, so the former definition of CFLAGS gets passed either from
11command line or via environment is completely expanded (see [1] for
12detailed explanation of override directive and variable append).
13
14Link: [1] https://www.gnu.org/software/make/manual/html_node/Override-Directive.html
15
16Upstream-Status: Backport [https://github.com/OP-TEE/optee_client/pull/211]
17
18Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
19Reviewed-by: Jerome Forissier <jerome@forissier.org>
20Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
21---
22 flags.mk | 8 ++++----
23 1 file changed, 4 insertions(+), 4 deletions(-)
24
25diff --git a/flags.mk b/flags.mk
26index c2f0e1c..65192bc 100644
27--- a/flags.mk
28+++ b/flags.mk
29@@ -6,7 +6,7 @@ CROSS_COMPILE ?= arm-linux-gnueabihf-
30 CC ?= $(CROSS_COMPILE)gcc
31 AR ?= $(CROSS_COMPILE)ar
32
33-CFLAGS := -Wall -Wbad-function-cast -Wcast-align \
34+override CFLAGS += -Wall -Wbad-function-cast -Wcast-align \
35 -Werror-implicit-function-declaration -Wextra \
36 -Wfloat-equal -Wformat-nonliteral -Wformat-security \
37 -Wformat=2 -Winit-self -Wmissing-declarations \
38@@ -16,13 +16,13 @@ CFLAGS := -Wall -Wbad-function-cast -Wcast-align \
39 -Wswitch-default -Wunsafe-loop-optimizations \
40 -Wwrite-strings -D_FILE_OFFSET_BITS=64
41 ifeq ($(CFG_WERROR),y)
42-CFLAGS += -Werror
43+override CFLAGS += -Werror
44 endif
45-CFLAGS += -c -fPIC
46+override CFLAGS += -c -fPIC
47
48 DEBUG ?= 0
49 ifeq ($(DEBUG), 1)
50-CFLAGS += -DDEBUG -O0 -g
51+override CFLAGS += -DDEBUG -O0 -g
52 endif
53
54 RM := rm -f
55--
562.17.1
57