blob: dc5b897742a42c379814822b86095aecb00707e0 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From af679853a45fe63f680c99e70416c8ac620d23b8 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Fri, 8 Sep 2017 15:02:14 -0400
Patrick Williamse69d2352017-02-23 20:56:04 -06004Subject: [PATCH] criu: Fix toolchain hardcode
Patrick Williamsd849ec72016-08-17 14:59:38 -05005
6Replace ":=" to "?=" so that the toolchain used by bitbake build system will
7be taken.
8
9Signed-off-by: Yang Shi <yang.shi@windriver.com>
Patrick Williamse69d2352017-02-23 20:56:04 -060010Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
Brad Bishopd7bf8c12018-02-25 22:55:05 -050011Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Patrick Williamsd849ec72016-08-17 14:59:38 -050012---
Patrick Williamse69d2352017-02-23 20:56:04 -060013 Makefile | 2 +-
Patrick Williamse69d2352017-02-23 20:56:04 -060014 scripts/nmk/scripts/include.mk | 2 +-
15 scripts/nmk/scripts/tools.mk | 40 ++++++++++++++++++++--------------------
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016 3 files changed, 22 insertions(+), 22 deletions(-)
Patrick Williamsd849ec72016-08-17 14:59:38 -050017
18diff --git a/Makefile b/Makefile
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019index f2583a2..d7f51e5 100644
Patrick Williamsd849ec72016-08-17 14:59:38 -050020--- a/Makefile
21+++ b/Makefile
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022@@ -17,7 +17,7 @@ ifeq ($(origin HOSTCFLAGS), undefined)
23 HOSTCFLAGS := $(CFLAGS) $(USERCFLAGS)
24 endif
Patrick Williamse69d2352017-02-23 20:56:04 -060025
26-UNAME-M := $(shell uname -m)
27+UNAME-M ?= $(shell uname -m)
Patrick Williamse69d2352017-02-23 20:56:04 -060028
Patrick Williamse69d2352017-02-23 20:56:04 -060029 #
Brad Bishopd7bf8c12018-02-25 22:55:05 -050030 # Supported Architectures
Patrick Williamse69d2352017-02-23 20:56:04 -060031diff --git a/scripts/nmk/scripts/include.mk b/scripts/nmk/scripts/include.mk
Brad Bishopd7bf8c12018-02-25 22:55:05 -050032index 04ccb3a..0d63bc7 100644
Patrick Williamse69d2352017-02-23 20:56:04 -060033--- a/scripts/nmk/scripts/include.mk
34+++ b/scripts/nmk/scripts/include.mk
35@@ -20,7 +20,7 @@ SUBARCH := $(shell uname -m | sed \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036 -e s/aarch64.*/aarch64/)
Patrick Williamse69d2352017-02-23 20:56:04 -060037
38 ARCH ?= $(SUBARCH)
39-SRCARCH := $(ARCH)
40+SRCARCH ?= $(ARCH)
41
42 export SUBARCH ARCH SRCARCH
43
44diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk
Brad Bishopd7bf8c12018-02-25 22:55:05 -050045index 56dba84..1698821 100644
Patrick Williamse69d2352017-02-23 20:56:04 -060046--- a/scripts/nmk/scripts/tools.mk
47+++ b/scripts/nmk/scripts/tools.mk
Brad Bishopd7bf8c12018-02-25 22:55:05 -050048@@ -2,30 +2,30 @@ ifndef ____nmk_defined__tools
Patrick Williamse69d2352017-02-23 20:56:04 -060049
50 #
51 # System tools shorthands
Patrick Williamsd849ec72016-08-17 14:59:38 -050052-RM := rm -f
Brad Bishopd7bf8c12018-02-25 22:55:05 -050053+RM ?= rm -f
54 HOSTLD ?= ld
55-LD := $(CROSS_COMPILE)$(HOSTLD)
56+LD ?= $(CROSS_COMPILE)$(HOSTLD)
57 HOSTCC ?= gcc
58-CC := $(CROSS_COMPILE)$(HOSTCC)
Patrick Williamse69d2352017-02-23 20:56:04 -060059-CPP := $(CC) -E
60-AS := $(CROSS_COMPILE)as
61-AR := $(CROSS_COMPILE)ar
62-STRIP := $(CROSS_COMPILE)strip
Patrick Williamsd849ec72016-08-17 14:59:38 -050063-OBJCOPY := $(CROSS_COMPILE)objcopy
Patrick Williamse69d2352017-02-23 20:56:04 -060064-OBJDUMP := $(CROSS_COMPILE)objdump
65-NM := $(CROSS_COMPILE)nm
66-MAKE := make
67-MKDIR := mkdir -p
68-AWK := awk
69-PERL := perl
70-PYTHON := python
71-FIND := find
72-SH := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050073+CC ?= $(CROSS_COMPILE)$(HOSTCC)
Patrick Williamse69d2352017-02-23 20:56:04 -060074+CPP ?= $(CC) -E
75+AS ?= $(CROSS_COMPILE)as
76+AR ?= $(CROSS_COMPILE)ar
77+STRIP ?= $(CROSS_COMPILE)strip
Patrick Williamsd849ec72016-08-17 14:59:38 -050078+OBJCOPY ?= $(CROSS_COMPILE)objcopy
Patrick Williamse69d2352017-02-23 20:56:04 -060079+OBJDUMP ?= $(CROSS_COMPILE)objdump
80+NM ?= $(CROSS_COMPILE)nm
81+MAKE ?= make
82+MKDIR ?= mkdir -p
83+AWK ?= awk
84+PERL ?= perl
85+PYTHON ?= python
86+FIND ?= find
87+SH ?= $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
88 else if [ -x /bin/bash ]; then echo /bin/bash; \
89 else echo sh; fi ; fi)
90-CSCOPE := cscope
91-ETAGS := etags
92-CTAGS := ctags
93+CSCOPE ?= cscope
94+ETAGS ?= etags
95+CTAGS ?= ctags
Patrick Williamsd849ec72016-08-17 14:59:38 -050096
Brad Bishopd7bf8c12018-02-25 22:55:05 -050097 export RM HOSTLD LD HOSTCC CC CPP AS AR STRIP OBJCOPY OBJDUMP
Patrick Williamse69d2352017-02-23 20:56:04 -060098 export NM SH MAKE MKDIR AWK PERL PYTHON SH CSCOPE
Patrick Williamsd849ec72016-08-17 14:59:38 -050099--
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001002.7.4
Patrick Williamsd849ec72016-08-17 14:59:38 -0500101