Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-flock / stx-metal / files / mtce-do-not-use-which-to-check-CC.patch
1 From 840f382ee691596474966f74bd1be37722bbc91c Mon Sep 17 00:00:00 2001
2 From: Jackie Huang <jackie.huang@windriver.com>
3 Date: Tue, 9 Jun 2020 20:52:31 +0800
4 Subject: [PATCH] mtce: do not use which to check CC
5
6 Upstream-Status: Inappropriate [OE cross-compile specific]
7
8 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
9 ---
10  common/Makefile        | 4 +---
11  public/Makefile        | 4 +---
12  2 files changed, 2 insertions(+), 6 deletions(-)
13
14 diff --git a/common/Makefile b/common/Makefile
15 index 229a1a3..f797724 100755
16 --- a/common/Makefile
17 +++ b/common/Makefile
18 @@ -17,9 +17,7 @@ CCFLAGS = -g -O2 -Wall -Wextra -Werror -std=c++11
19  STATIC_ANALYSIS_TOOL = cppcheck
20  STATIC_ANALYSIS_TOOL_EXISTS = $(shell [[ -e `which $(STATIC_ANALYSIS_TOOL)` ]] && echo 1 || echo 0)
21
22 -ifeq (,$(shell which ${CC}))
23 -CC=g++
24 -endif
25 +CC ?= g++
26
27  .cpp.o:
28         $(CXX) $(CCFLAGS) $(INCLUDES) $(EXTRACCFLAGS) -c $< -o $@
29 diff --git a/public/Makefile b/public/Makefile
30 index 403638f..7dd80e4 100644
31 --- a/public/Makefile
32 +++ b/public/Makefile
33 @@ -13,9 +13,7 @@ LDFLAGS = -shared
34  CFLAGS = -fPIC -g -O2 -Wall -Wextra -Werror
35  TARGET_LIB = libamon.so
36  lib: build
37 -ifeq (,$(shell which ${CC}))
38 -CC=gcc
39 -endif
40 +CC ?= gcc
41
42  STATIC_ANALYSIS_TOOL = cppcheck
43  STATIC_ANALYSIS_TOOL_EXISTS = $(shell [[ -e `which $(STATIC_ANALYSIS_TOOL)` ]] && echo 1 || echo 0)
44 --
45 2.7.4