mirror of
https://github.com/torvalds/linux.git
synced 2024-12-06 02:52:22 +00:00
a24ebb4937
Use $(KHDR_INCLUDES) as lookup path for installed kernel headers rather than using kernel headers in include/uapi from the source kernel tree kernel headers. Remove bogus ../../../../include/ from the search path, because kernel source headers are not needed by those user-space selftests, and it causes issues because -I paths are searched before -isystem paths, and conflicts for files appearing both in kernel sources and in uapi headers with incompatible semantics (e.g. types.h). Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Shuah Khan <shuah@kernel.org> Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
29 lines
700 B
Makefile
29 lines
700 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
CFLAGS += -D_FILE_OFFSET_BITS=64
|
|
CFLAGS += $(KHDR_INCLUDES)
|
|
|
|
TEST_GEN_PROGS := memfd_test
|
|
TEST_PROGS := run_fuse_test.sh run_hugetlbfs_test.sh
|
|
TEST_GEN_FILES := fuse_test fuse_mnt
|
|
|
|
VAR_CFLAGS := $(shell pkg-config fuse --cflags 2>/dev/null)
|
|
ifeq ($(VAR_CFLAGS),)
|
|
VAR_CFLAGS := -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse
|
|
endif
|
|
|
|
VAR_LDLIBS := $(shell pkg-config fuse --libs 2>/dev/null)
|
|
ifeq ($(VAR_LDLIBS),)
|
|
VAR_LDLIBS := -lfuse -pthread
|
|
endif
|
|
|
|
fuse_mnt.o: CFLAGS += $(VAR_CFLAGS)
|
|
|
|
include ../lib.mk
|
|
|
|
$(OUTPUT)/fuse_mnt: LDLIBS += $(VAR_LDLIBS)
|
|
|
|
$(OUTPUT)/memfd_test: memfd_test.c common.c
|
|
$(OUTPUT)/fuse_test: fuse_test.c common.c
|
|
|
|
EXTRA_CLEAN = $(OUTPUT)/common.o
|