blob: dc5b897742a42c379814822b86095aecb00707e0 [file] [log] [blame]
From af679853a45fe63f680c99e70416c8ac620d23b8 Mon Sep 17 00:00:00 2001
From: Mark Asselstine <mark.asselstine@windriver.com>
Date: Fri, 8 Sep 2017 15:02:14 -0400
Subject: [PATCH] criu: Fix toolchain hardcode
Replace ":=" to "?=" so that the toolchain used by bitbake build system will
be taken.
Signed-off-by: Yang Shi <yang.shi@windriver.com>
Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
Makefile | 2 +-
scripts/nmk/scripts/include.mk | 2 +-
scripts/nmk/scripts/tools.mk | 40 ++++++++++++++++++++--------------------
3 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/Makefile b/Makefile
index f2583a2..d7f51e5 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ ifeq ($(origin HOSTCFLAGS), undefined)
HOSTCFLAGS := $(CFLAGS) $(USERCFLAGS)
endif
-UNAME-M := $(shell uname -m)
+UNAME-M ?= $(shell uname -m)
#
# Supported Architectures
diff --git a/scripts/nmk/scripts/include.mk b/scripts/nmk/scripts/include.mk
index 04ccb3a..0d63bc7 100644
--- a/scripts/nmk/scripts/include.mk
+++ b/scripts/nmk/scripts/include.mk
@@ -20,7 +20,7 @@ SUBARCH := $(shell uname -m | sed \
-e s/aarch64.*/aarch64/)
ARCH ?= $(SUBARCH)
-SRCARCH := $(ARCH)
+SRCARCH ?= $(ARCH)
export SUBARCH ARCH SRCARCH
diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk
index 56dba84..1698821 100644
--- a/scripts/nmk/scripts/tools.mk
+++ b/scripts/nmk/scripts/tools.mk
@@ -2,30 +2,30 @@ ifndef ____nmk_defined__tools
#
# System tools shorthands
-RM := rm -f
+RM ?= rm -f
HOSTLD ?= ld
-LD := $(CROSS_COMPILE)$(HOSTLD)
+LD ?= $(CROSS_COMPILE)$(HOSTLD)
HOSTCC ?= gcc
-CC := $(CROSS_COMPILE)$(HOSTCC)
-CPP := $(CC) -E
-AS := $(CROSS_COMPILE)as
-AR := $(CROSS_COMPILE)ar
-STRIP := $(CROSS_COMPILE)strip
-OBJCOPY := $(CROSS_COMPILE)objcopy
-OBJDUMP := $(CROSS_COMPILE)objdump
-NM := $(CROSS_COMPILE)nm
-MAKE := make
-MKDIR := mkdir -p
-AWK := awk
-PERL := perl
-PYTHON := python
-FIND := find
-SH := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
+CC ?= $(CROSS_COMPILE)$(HOSTCC)
+CPP ?= $(CC) -E
+AS ?= $(CROSS_COMPILE)as
+AR ?= $(CROSS_COMPILE)ar
+STRIP ?= $(CROSS_COMPILE)strip
+OBJCOPY ?= $(CROSS_COMPILE)objcopy
+OBJDUMP ?= $(CROSS_COMPILE)objdump
+NM ?= $(CROSS_COMPILE)nm
+MAKE ?= make
+MKDIR ?= mkdir -p
+AWK ?= awk
+PERL ?= perl
+PYTHON ?= python
+FIND ?= find
+SH ?= $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
-CSCOPE := cscope
-ETAGS := etags
-CTAGS := ctags
+CSCOPE ?= cscope
+ETAGS ?= etags
+CTAGS ?= ctags
export RM HOSTLD LD HOSTCC CC CPP AS AR STRIP OBJCOPY OBJDUMP
export NM SH MAKE MKDIR AWK PERL PYTHON SH CSCOPE
--
2.7.4