mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
build/nmk: Provide proper SUBARCH
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@arista.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
parent
a4fa4162d4
commit
df66aa99b6
1 changed files with 12 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue