Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: Set CC using CROSS_COMPILE once in lib.mk

This avoids repeating the logic in every Makefile. We mimic the
top-level Makefile and use $(CROSS_COMPILE)gcc.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>

authored by

Michael Ellerman and committed by
Shuah Khan
84f887bf 6faeeea4

+5 -9
-1
tools/testing/selftests/efivarfs/Makefile
··· 1 - CC = $(CROSS_COMPILE)gcc 2 1 CFLAGS = -Wall 3 2 4 3 test_objs = open-unlink create-read
-1
tools/testing/selftests/exec/Makefile
··· 1 - CC = $(CROSS_COMPILE)gcc 2 1 CFLAGS = -Wall 3 2 BINARIES = execveat 4 3 DEPS = execveat.symlink execveat.denatured script subdir
-1
tools/testing/selftests/kcmp/Makefile
··· 1 - CC := $(CROSS_COMPILE)$(CC) 2 1 CFLAGS += -I../../../../usr/include/ 3 2 4 3 all: kcmp_test
+4
tools/testing/selftests/lib.mk
··· 1 + # This mimics the top-level Makefile. We do it explicitly here so that this 2 + # Makefile can operate with or without the kbuild infrastructure. 3 + CC := $(CROSS_COMPILE)gcc 4 + 1 5 define RUN_TESTS 2 6 @for TEST in $(TEST_PROGS); do \ 3 7 (./$$TEST && echo "selftests: $$TEST [PASS]") || echo "selftests: $$TEST [FAIL]"; \
-1
tools/testing/selftests/net/Makefile
··· 1 1 # Makefile for net selftests 2 2 3 - CC = $(CROSS_COMPILE)gcc 4 3 CFLAGS = -Wall -O2 -g 5 4 6 5 CFLAGS += -I../../../../usr/include/
+1 -2
tools/testing/selftests/powerpc/Makefile
··· 8 8 9 9 GIT_VERSION = $(shell git describe --always --long --dirty || echo "unknown") 10 10 11 - CC := $(CROSS_COMPILE)$(CC) 12 11 CFLAGS := -Wall -O2 -flto -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CURDIR) $(CFLAGS) 13 12 14 - export CC CFLAGS 13 + export CFLAGS 15 14 16 15 TARGETS = pmu copyloops mm tm primitives stringloops 17 16
-2
tools/testing/selftests/size/Makefile
··· 1 - CC = $(CROSS_COMPILE)gcc 2 - 3 1 all: get_size 4 2 5 3 get_size: get_size.c
-1
tools/testing/selftests/vm/Makefile
··· 1 1 # Makefile for vm selftests 2 2 3 - CC = $(CROSS_COMPILE)gcc 4 3 CFLAGS = -Wall 5 4 BINARIES = hugepage-mmap hugepage-shm map_hugetlb thuge-gen hugetlbfstest 6 5 BINARIES += transhuge-stress