mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 12:35:52 +02:00
selftests: vm: enable cross-compilation
Selftests vm builds break when doing cross-compilation. The Makefile MACHINE variable incorrectly picks upp the host machine architecture. If the CROSS_COMPILE variable is set, dig out the target host architecture from CROSS_COMPILE, instead of calling uname. Link: https://lkml.kernel.org/r/20230109114251.3349638-1-bjorn@kernel.org Signed-off-by: Björn Töpel <bjorn@rivosinc.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
d526643f15
commit
9a3f21fe5c
|
|
@ -5,7 +5,11 @@ LOCAL_HDRS += $(selfdir)/mm/local_config.h $(top_srcdir)/mm/gup_test.h
|
|||
|
||||
include local_config.mk
|
||||
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
uname_M := $(shell uname -m 2>/dev/null || echo not)
|
||||
else
|
||||
uname_M := $(shell echo $(CROSS_COMPILE) | grep -o '^[a-z0-9]\+')
|
||||
endif
|
||||
MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/ppc64/')
|
||||
|
||||
# Without this, failed build products remain, with up-to-date timestamps,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user