]> code.ossystems Code Review - meta-freescale.git/commitdiff
optee-client: refresh patch applied upstream
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Thu, 4 Jun 2020 19:30:56 +0000 (19:30 +0000)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 23 Jun 2020 11:44:02 +0000 (08:44 -0300)
PR has been closed upstream with modifications to originally submitted
patch. Later implementation implied more modification, which are not
compatible with current version, therefore accepted patch has been
backported to this fork.

Refresh patch file with updated version from upstream.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch

index 3bbf898ba1b8f924a0d5c22b84f0f74acd232dba..86c360f2d2e0c37d3841758a6529d1d9ac5c797c 100644 (file)
@@ -1,23 +1,29 @@
-From ea7e0fba6da734e5f99f84d10d456ceaaed05883 Mon Sep 17 00:00:00 2001
+From 6a600c5637c5446ab3d11eb4304a1dd473ec503e Mon Sep 17 00:00:00 2001
 From: Andrey Zhizhikin <andrey.z@gmail.com>
-Date: Sun, 31 May 2020 20:40:25 +0000
+Date: Thu, 4 Jun 2020 19:24:05 +0000
 Subject: [PATCH] flags: do not override CFLAGS from host
 
 Some build systems set CFLAGS in environment before the build, but they
 got overridden by CFLAGS immediate assignment operator.
 
-Replace immediate assignment with append directive, so the former
-definition of CFLAGS gets properly expanded.
+Replace immediate assignment with append directive and use override
+directive, so the former definition of CFLAGS gets passed either from
+command line or via environment is completely expanded (see [1] for
+detailed explanation of override directive and variable append).
 
-Upstream-Status: Submitted [https://github.com/OP-TEE/optee_client/pull/211]
+Link: [1] https://www.gnu.org/software/make/manual/html_node/Override-Directive.html
+
+Upstream-Status: Backport [https://github.com/OP-TEE/optee_client/pull/211]
 
 Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
+Reviewed-by: Jerome Forissier <jerome@forissier.org>
+Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
 ---
- flags.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ flags.mk | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/flags.mk b/flags.mk
-index 71f3d18..af13495 100644
+index 71f3d18..faabef9 100644
 --- a/flags.mk
 +++ b/flags.mk
 @@ -6,7 +6,7 @@ CROSS_COMPILE   ?= arm-linux-gnueabihf-
@@ -25,10 +31,24 @@ index 71f3d18..af13495 100644
  AR            ?= $(CROSS_COMPILE)ar
  
 -CFLAGS          := -Wall -Wbad-function-cast -Wcast-align \
-+CFLAGS          += -Wall -Wbad-function-cast -Wcast-align \
++override CFLAGS += -Wall -Wbad-function-cast -Wcast-align \
                   -Werror-implicit-function-declaration -Wextra \
                   -Wfloat-equal -Wformat-nonliteral -Wformat-security \
                   -Wformat=2 -Winit-self -Wmissing-declarations \
+@@ -15,11 +15,11 @@ CFLAGS          := -Wall -Wbad-function-cast -Wcast-align \
+                  -Wpointer-arith -Wshadow -Wstrict-prototypes \
+                  -Wswitch-default -Wunsafe-loop-optimizations \
+                  -Wwrite-strings -Werror
+-CFLAGS          += -c -fPIC
++override CFLAGS += -c -fPIC
+ DEBUG       ?= 0
+ ifeq ($(DEBUG), 1)
+-CFLAGS          += -DDEBUG -O0 -g
++override CFLAGS += -DDEBUG -O0 -g
+ endif
+ RM              := rm -f
 -- 
 2.17.1