]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
selftests: Set CC using CROSS_COMPILE once in lib.mk
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 4 Mar 2015 10:41:31 +0000 (21:41 +1100)
committerShuah Khan <shuahkh@osg.samsung.com>
Thu, 19 Mar 2015 21:16:51 +0000 (15:16 -0600)
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>
tools/testing/selftests/efivarfs/Makefile
tools/testing/selftests/exec/Makefile
tools/testing/selftests/kcmp/Makefile
tools/testing/selftests/lib.mk
tools/testing/selftests/net/Makefile
tools/testing/selftests/powerpc/Makefile
tools/testing/selftests/size/Makefile
tools/testing/selftests/vm/Makefile

index 9ff04f154bd5f85d211100e318c7ce542c660c4c..736c3ddfc787499a3a114ab87ad173054e5468c2 100644 (file)
@@ -1,4 +1,3 @@
-CC = $(CROSS_COMPILE)gcc
 CFLAGS = -Wall
 
 test_objs = open-unlink create-read
index 886cabe307b15a2c5292c75204db800a8e6ab574..4edb7d0da29b81aa1b0240ed600a42c42d63df9f 100644 (file)
@@ -1,4 +1,3 @@
-CC = $(CROSS_COMPILE)gcc
 CFLAGS = -Wall
 BINARIES = execveat
 DEPS = execveat.symlink execveat.denatured script subdir
index 0eecd183058c7993439f6b756bb99f895c784d12..2ae7450a9a8984e2f0ba86a96842010375076757 100644 (file)
@@ -1,4 +1,3 @@
-CC := $(CROSS_COMPILE)$(CC)
 CFLAGS += -I../../../../usr/include/
 
 all: kcmp_test
index 0baf7d32a67d62a51e21d6e16d8718df1eeda085..2194155ae62a0f1cf4500b60dc58c4ec3a93a3ce 100644 (file)
@@ -1,3 +1,7 @@
+# This mimics the top-level Makefile. We do it explicitly here so that this
+# Makefile can operate with or without the kbuild infrastructure.
+CC := $(CROSS_COMPILE)gcc
+
 define RUN_TESTS
        @for TEST in $(TEST_PROGS); do \
                (./$$TEST && echo "selftests: $$TEST [PASS]") || echo "selftests: $$TEST [FAIL]"; \
index 6ba2ac7bbb0df2f59cfc54869e0e97f1a2dab3dc..fac4782c51d8439e524a3675bd6acc5d2df79c21 100644 (file)
@@ -1,6 +1,5 @@
 # Makefile for net selftests
 
-CC = $(CROSS_COMPILE)gcc
 CFLAGS = -Wall -O2 -g
 
 CFLAGS += -I../../../../usr/include/
index 22c4f8ffa42286c64447d99e1274c28034bd5f10..2958fe9a74e97b2c86ce1c8e6072f49291cca257 100644 (file)
@@ -8,10 +8,9 @@ ifeq ($(ARCH),powerpc)
 
 GIT_VERSION = $(shell git describe --always --long --dirty || echo "unknown")
 
-CC := $(CROSS_COMPILE)$(CC)
 CFLAGS := -Wall -O2 -flto -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CURDIR) $(CFLAGS)
 
-export CC CFLAGS
+export CFLAGS
 
 TARGETS = pmu copyloops mm tm primitives stringloops
 
index e4353d74ea6e2ab14d6a15f45c9e8b3901c00959..bbd0b5398b613c08ee77eb4fbf9740383d874c0d 100644 (file)
@@ -1,5 +1,3 @@
-CC = $(CROSS_COMPILE)gcc
-
 all: get_size
 
 get_size: get_size.c
index 1a49761df6eda18c05475c86bb6bf2eae0667872..a5ce9534eb15f35335b389ec89f0379bfc45c224 100644 (file)
@@ -1,6 +1,5 @@
 # Makefile for vm selftests
 
-CC = $(CROSS_COMPILE)gcc
 CFLAGS = -Wall
 BINARIES = hugepage-mmap hugepage-shm map_hugetlb thuge-gen hugetlbfstest
 BINARIES += transhuge-stress