mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
selftests: Fix seccomp to support relocatable build (O=objdir)
Fix seccomp relocatable builds. This is a simple fix to use the right lib.mk variable TEST_GEN_PROGS. Local header dependency is addressed in a change to lib.mk as a framework change that enforces the dependency without requiring changes to individual tests. The following use-cases work with this change: In seccomp directory: make all and make clean From top level from main Makefile: make kselftest-install O=objdir ARCH=arm64 HOSTCC=gcc \ CROSS_COMPILE=aarch64-linux-gnu- TARGETS=seccomp Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
c31801da6e
commit
860f0a7792
@ -1,17 +1,6 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
all:
|
|
||||||
|
|
||||||
include ../lib.mk
|
|
||||||
|
|
||||||
.PHONY: all clean
|
|
||||||
|
|
||||||
BINARIES := seccomp_bpf seccomp_benchmark
|
|
||||||
CFLAGS += -Wl,-no-as-needed -Wall
|
CFLAGS += -Wl,-no-as-needed -Wall
|
||||||
|
LDFLAGS += -lpthread
|
||||||
|
|
||||||
seccomp_bpf: seccomp_bpf.c ../kselftest_harness.h
|
TEST_GEN_PROGS := seccomp_bpf seccomp_benchmark
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $< -lpthread -o $@
|
include ../lib.mk
|
||||||
|
|
||||||
TEST_PROGS += $(BINARIES)
|
|
||||||
EXTRA_CLEAN := $(BINARIES)
|
|
||||||
|
|
||||||
all: $(BINARIES)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user