aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2021-03-19 16:53:30 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2021-03-24 15:43:20 +0000
commit5238c2cd5a2e0dc846d1b900553211e832952b8d (patch)
treef82a2c61b2d19c5e3d00d1f750f2ac4374684154
parentkselftest/arm64: mte: Fix MTE feature detection (diff)
downloadlinux-dev-5238c2cd5a2e0dc846d1b900553211e832952b8d.tar.xz
linux-dev-5238c2cd5a2e0dc846d1b900553211e832952b8d.zip
kselftest/arm64: mte: Use cross-compiler if specified
At the moment we either need to provide CC explicitly, or use a native machine to get the ARM64 MTE selftest compiled. It seems useful to use the same (cross-)compiler as we use for the kernel, so copy the recipe we use in the pauth selftest. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Mark Brown <broone@kernel.org> Link: https://lore.kernel.org/r/20210319165334.29213-8-andre.przywara@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r--tools/testing/selftests/arm64/mte/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/mte/Makefile b/tools/testing/selftests/arm64/mte/Makefile
index 90aadd86fa0d..fa282e5f2069 100644
--- a/tools/testing/selftests/arm64/mte/Makefile
+++ b/tools/testing/selftests/arm64/mte/Makefile
@@ -1,6 +1,11 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2020 ARM Limited
+# preserve CC value from top level Makefile
+ifeq ($(CC),cc)
+CC := $(CROSS_COMPILE)gcc
+endif
+
CFLAGS += -std=gnu99 -I. -pthread
LDFLAGS += -pthread
SRCS := $(filter-out mte_common_util.c,$(wildcard *.c))