forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
6faeeea44b
commit
84f887bfb9
|
@ -1,4 +1,3 @@
|
||||||
CC = $(CROSS_COMPILE)gcc
|
|
||||||
CFLAGS = -Wall
|
CFLAGS = -Wall
|
||||||
|
|
||||||
test_objs = open-unlink create-read
|
test_objs = open-unlink create-read
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
CC = $(CROSS_COMPILE)gcc
|
|
||||||
CFLAGS = -Wall
|
CFLAGS = -Wall
|
||||||
BINARIES = execveat
|
BINARIES = execveat
|
||||||
DEPS = execveat.symlink execveat.denatured script subdir
|
DEPS = execveat.symlink execveat.denatured script subdir
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
CC := $(CROSS_COMPILE)$(CC)
|
|
||||||
CFLAGS += -I../../../../usr/include/
|
CFLAGS += -I../../../../usr/include/
|
||||||
|
|
||||||
all: kcmp_test
|
all: kcmp_test
|
||||||
|
|
|
@ -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
|
define RUN_TESTS
|
||||||
@for TEST in $(TEST_PROGS); do \
|
@for TEST in $(TEST_PROGS); do \
|
||||||
(./$$TEST && echo "selftests: $$TEST [PASS]") || echo "selftests: $$TEST [FAIL]"; \
|
(./$$TEST && echo "selftests: $$TEST [PASS]") || echo "selftests: $$TEST [FAIL]"; \
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# Makefile for net selftests
|
# Makefile for net selftests
|
||||||
|
|
||||||
CC = $(CROSS_COMPILE)gcc
|
|
||||||
CFLAGS = -Wall -O2 -g
|
CFLAGS = -Wall -O2 -g
|
||||||
|
|
||||||
CFLAGS += -I../../../../usr/include/
|
CFLAGS += -I../../../../usr/include/
|
||||||
|
|
|
@ -8,10 +8,9 @@ ifeq ($(ARCH),powerpc)
|
||||||
|
|
||||||
GIT_VERSION = $(shell git describe --always --long --dirty || echo "unknown")
|
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)
|
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
|
TARGETS = pmu copyloops mm tm primitives stringloops
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
CC = $(CROSS_COMPILE)gcc
|
|
||||||
|
|
||||||
all: get_size
|
all: get_size
|
||||||
|
|
||||||
get_size: get_size.c
|
get_size: get_size.c
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# Makefile for vm selftests
|
# Makefile for vm selftests
|
||||||
|
|
||||||
CC = $(CROSS_COMPILE)gcc
|
|
||||||
CFLAGS = -Wall
|
CFLAGS = -Wall
|
||||||
BINARIES = hugepage-mmap hugepage-shm map_hugetlb thuge-gen hugetlbfstest
|
BINARIES = hugepage-mmap hugepage-shm map_hugetlb thuge-gen hugetlbfstest
|
||||||
BINARIES += transhuge-stress
|
BINARIES += transhuge-stress
|
||||||
|
|
Loading…
Reference in New Issue
Block a user