mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
a738a4ce84
When building selftests/cgroup: with clang the following error are seen: clang -Wall -pthread test_memcontrol.c cgroup_util.c ../clone3/clone3_selftests.h -o .../builds/current/kselftest/cgroup/test_memcontrol clang: error: cannot specify -o when generating multiple output files make[3]: *** [../lib.mk:146: .../builds/current/kselftest/cgroup/test_memcontrol] Error 1 Rework to add the header files to LOCAL_HDRS before including ../lib.mk, since the dependency is evaluated in '$(OUTPUT)/%:%.c $(LOCAL_HDRS)' in file lib.mk. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
23 lines
562 B
Makefile
23 lines
562 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
CFLAGS += -Wall -pthread
|
|
|
|
all:
|
|
|
|
TEST_FILES := with_stress.sh
|
|
TEST_PROGS := test_stress.sh
|
|
TEST_GEN_PROGS = test_memcontrol
|
|
TEST_GEN_PROGS += test_kmem
|
|
TEST_GEN_PROGS += test_core
|
|
TEST_GEN_PROGS += test_freezer
|
|
TEST_GEN_PROGS += test_kill
|
|
|
|
LOCAL_HDRS += $(selfdir)/clone3/clone3_selftests.h $(selfdir)/pidfd/pidfd.h
|
|
|
|
include ../lib.mk
|
|
|
|
$(OUTPUT)/test_memcontrol: cgroup_util.c
|
|
$(OUTPUT)/test_kmem: cgroup_util.c
|
|
$(OUTPUT)/test_core: cgroup_util.c
|
|
$(OUTPUT)/test_freezer: cgroup_util.c
|
|
$(OUTPUT)/test_kill: cgroup_util.c
|