Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'landlock-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux

Pull landlock fix from Mickaël Salaün:
"Fix out-of-tree builds for Landlock tests"

* tag 'landlock-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux:
selftests/landlock: Fix out-of-tree builds

+14 -9
+10 -9
tools/testing/selftests/landlock/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 + # 3 + # First run: make -C ../../../.. headers_install 2 4 3 5 CFLAGS += -Wall -O2 $(KHDR_INCLUDES) 6 + LDLIBS += -lcap 7 + 8 + LOCAL_HDRS += common.h 4 9 5 10 src_test := $(wildcard *_test.c) 6 11 ··· 13 8 14 9 TEST_GEN_PROGS_EXTENDED := true 15 10 16 - OVERRIDE_TARGETS := 1 17 - top_srcdir := ../../../.. 11 + # Static linking for short targets: 12 + $(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static 13 + 18 14 include ../lib.mk 19 15 20 - khdr_dir = $(top_srcdir)/usr/include 21 - 22 - $(OUTPUT)/true: true.c 23 - $(LINK.c) $< $(LDLIBS) -o $@ -static 24 - 25 - $(OUTPUT)/%_test: %_test.c $(khdr_dir)/linux/landlock.h ../kselftest_harness.h common.h 26 - $(LINK.c) $< $(LDLIBS) -o $@ -lcap -I$(khdr_dir) 16 + # Static linking for targets with $(OUTPUT)/ prefix: 17 + $(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static
+4
tools/testing/selftests/lib.mk
··· 42 42 selfdir = $(realpath $(dir $(filter %/lib.mk,$(MAKEFILE_LIST)))) 43 43 top_srcdir = $(selfdir)/../../.. 44 44 45 + ifeq ($(KHDR_INCLUDES),) 46 + KHDR_INCLUDES := -isystem $(top_srcdir)/usr/include 47 + endif 48 + 45 49 # The following are built by lib.mk common compile rules. 46 50 # TEST_CUSTOM_PROGS should be used by tests that require 47 51 # custom build rule and prevent common build rule use.