blob: d1f136c4040603e6350e42dbdba470517dfb550e [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From c005b7a4874f55df687ff22bc425551775581421 Mon Sep 17 00:00:00 2001
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002From: 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>
Brad Bishop316dfdd2018-06-25 12:45:53 -040012
Patrick Williamsd849ec72016-08-17 14:59:38 -050013---
Patrick Williamse69d2352017-02-23 20:56:04 -060014 Makefile | 2 +-
Patrick Williamse69d2352017-02-23 20:56:04 -060015 scripts/nmk/scripts/include.mk | 2 +-
16 scripts/nmk/scripts/tools.mk | 40 ++++++++++++++++++++--------------------
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017 3 files changed, 22 insertions(+), 22 deletions(-)
Patrick Williamsd849ec72016-08-17 14:59:38 -050018
19diff --git a/Makefile b/Makefile
Brad Bishopd7bf8c12018-02-25 22:55:05 -050020index f2583a2..d7f51e5 100644
Patrick Williamsd849ec72016-08-17 14:59:38 -050021--- a/Makefile
22+++ b/Makefile
Brad Bishopd7bf8c12018-02-25 22:55:05 -050023@@ -17,7 +17,7 @@ ifeq ($(origin HOSTCFLAGS), undefined)
24 HOSTCFLAGS := $(CFLAGS) $(USERCFLAGS)
25 endif
Patrick Williamse69d2352017-02-23 20:56:04 -060026
27-UNAME-M := $(shell uname -m)
28+UNAME-M ?= $(shell uname -m)
Patrick Williamse69d2352017-02-23 20:56:04 -060029
Patrick Williamse69d2352017-02-23 20:56:04 -060030 #
Brad Bishopd7bf8c12018-02-25 22:55:05 -050031 # Supported Architectures
Patrick Williamse69d2352017-02-23 20:56:04 -060032diff --git a/scripts/nmk/scripts/include.mk b/scripts/nmk/scripts/include.mk
Brad Bishopd7bf8c12018-02-25 22:55:05 -050033index 04ccb3a..0d63bc7 100644
Patrick Williamse69d2352017-02-23 20:56:04 -060034--- a/scripts/nmk/scripts/include.mk
35+++ b/scripts/nmk/scripts/include.mk
36@@ -20,7 +20,7 @@ SUBARCH := $(shell uname -m | sed \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050037 -e s/aarch64.*/aarch64/)
Patrick Williamse69d2352017-02-23 20:56:04 -060038
39 ARCH ?= $(SUBARCH)
40-SRCARCH := $(ARCH)
41+SRCARCH ?= $(ARCH)
42
43 export SUBARCH ARCH SRCARCH
44
45diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk
Brad Bishopd7bf8c12018-02-25 22:55:05 -050046index 56dba84..1698821 100644
Patrick Williamse69d2352017-02-23 20:56:04 -060047--- a/scripts/nmk/scripts/tools.mk
48+++ b/scripts/nmk/scripts/tools.mk
Brad Bishopd7bf8c12018-02-25 22:55:05 -050049@@ -2,30 +2,30 @@ ifndef ____nmk_defined__tools
Patrick Williamse69d2352017-02-23 20:56:04 -060050
51 #
52 # System tools shorthands
Patrick Williamsd849ec72016-08-17 14:59:38 -050053-RM := rm -f
Brad Bishopd7bf8c12018-02-25 22:55:05 -050054+RM ?= rm -f
55 HOSTLD ?= ld
56-LD := $(CROSS_COMPILE)$(HOSTLD)
57+LD ?= $(CROSS_COMPILE)$(HOSTLD)
58 HOSTCC ?= gcc
59-CC := $(CROSS_COMPILE)$(HOSTCC)
Patrick Williamse69d2352017-02-23 20:56:04 -060060-CPP := $(CC) -E
61-AS := $(CROSS_COMPILE)as
62-AR := $(CROSS_COMPILE)ar
63-STRIP := $(CROSS_COMPILE)strip
Patrick Williamsd849ec72016-08-17 14:59:38 -050064-OBJCOPY := $(CROSS_COMPILE)objcopy
Patrick Williamse69d2352017-02-23 20:56:04 -060065-OBJDUMP := $(CROSS_COMPILE)objdump
66-NM := $(CROSS_COMPILE)nm
67-MAKE := make
68-MKDIR := mkdir -p
69-AWK := awk
70-PERL := perl
71-PYTHON := python
72-FIND := find
73-SH := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050074+CC ?= $(CROSS_COMPILE)$(HOSTCC)
Patrick Williamse69d2352017-02-23 20:56:04 -060075+CPP ?= $(CC) -E
76+AS ?= $(CROSS_COMPILE)as
77+AR ?= $(CROSS_COMPILE)ar
78+STRIP ?= $(CROSS_COMPILE)strip
Patrick Williamsd849ec72016-08-17 14:59:38 -050079+OBJCOPY ?= $(CROSS_COMPILE)objcopy
Patrick Williamse69d2352017-02-23 20:56:04 -060080+OBJDUMP ?= $(CROSS_COMPILE)objdump
81+NM ?= $(CROSS_COMPILE)nm
82+MAKE ?= make
83+MKDIR ?= mkdir -p
84+AWK ?= awk
85+PERL ?= perl
86+PYTHON ?= python
87+FIND ?= find
88+SH ?= $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
89 else if [ -x /bin/bash ]; then echo /bin/bash; \
90 else echo sh; fi ; fi)
91-CSCOPE := cscope
92-ETAGS := etags
93-CTAGS := ctags
94+CSCOPE ?= cscope
95+ETAGS ?= etags
96+CTAGS ?= ctags
Patrick Williamsd849ec72016-08-17 14:59:38 -050097
Brad Bishopd7bf8c12018-02-25 22:55:05 -050098 export RM HOSTLD LD HOSTCC CC CPP AS AR STRIP OBJCOPY OBJDUMP
Patrick Williamse69d2352017-02-23 20:56:04 -060099 export NM SH MAKE MKDIR AWK PERL PYTHON SH CSCOPE