[CRIU] [PATCH 03/10] build/nmk: Provide proper SUBARCH
Dmitry Safonov
dima at arista.com
Fri Nov 22 00:56:36 MSK 2019
It's always equal ARCH and not very useful (so nothing actually uses it).
Time for a change: SUBARCH now is meaningful and gives a way to detect
what kind of ARCH flavor build is dealing with.
Also, for cross-compiling sake don't set SUBARCH if the user supplied it.
(and don't call useless uname during cross compilation)
Signed-off-by: Dmitry Safonov <dima at arista.com>
---
scripts/nmk/scripts/include.mk | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/scripts/nmk/scripts/include.mk b/scripts/nmk/scripts/include.mk
index ee0e32f62b15..c1c1e94af425 100644
--- a/scripts/nmk/scripts/include.mk
+++ b/scripts/nmk/scripts/include.mk
@@ -8,21 +8,20 @@ endif
#
# Common vars.
-SUBARCH := $(shell uname -m | sed \
- -e s/i.86/x86/ \
- -e s/x86_64/x86/ \
- -e s/sun4u/sparc64/ \
- -e s/arm.*/arm/ \
- -e s/sa110/arm/ \
- -e s/s390x/s390/ \
- -e s/parisc64/parisc/ \
- -e s/ppc64.*/ppc64/ \
- -e s/mips.*/mips/ \
- -e s/sh[234].*/sh/ \
+SUBARCH ?= $(shell uname -m)
+ARCH ?= $(shell echo $(SUBARCH) | sed \
+ -e s/i.86/x86/ \
+ -e s/x86_64/x86/ \
+ -e s/sun4u/sparc64/ \
+ -e s/arm.*/arm/ \
+ -e s/sa110/arm/ \
+ -e s/s390x/s390/ \
+ -e s/parisc64/parisc/ \
+ -e s/ppc64.*/ppc64/ \
+ -e s/mips.*/mips/ \
+ -e s/sh[234].*/sh/ \
-e s/aarch64.*/aarch64/)
-ARCH ?= $(SUBARCH)
-
export SUBARCH ARCH
ifndef ____nmk_defined__tools
--
2.24.0
More information about the CRIU
mailing list