summaryrefslogtreecommitdiff
path: root/samples/vfs
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-04-29 06:45:22 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2020-05-17 12:52:02 +0300
commit28949b84b2cb2473507ec2fed06728f995dd7942 (patch)
tree849d597e58bb9678e12f869a7cbc5cd97f87348b /samples/vfs
parent37249f5945b77d009519efca9544151ea2a78596 (diff)
downloadlinux-28949b84b2cb2473507ec2fed06728f995dd7942.tar.xz
samples: vfs: build sample programs for target architecture
These userspace programs include UAPI headers exported to usr/include/. 'make headers' always works for the target architecture (i.e. the same architecture as the kernel), so the sample programs should be built for the target as well. Kbuild now supports 'userprogs' for that. I also guarded the CONFIG option by 'depends on CC_CAN_LINK' because $(CC) may not provide libc. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'samples/vfs')
-rw-r--r--samples/vfs/Makefile11
1 files changed, 3 insertions, 8 deletions
diff --git a/samples/vfs/Makefile b/samples/vfs/Makefile
index 65acdde5c117..00b6824f9237 100644
--- a/samples/vfs/Makefile
+++ b/samples/vfs/Makefile
@@ -1,10 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-# List of programs to build
-hostprogs := \
- test-fsmount \
- test-statx
+userprogs := test-fsmount test-statx
+always-y := $(userprogs)
-always-y := $(hostprogs)
-
-HOSTCFLAGS_test-fsmount.o += -I$(objtree)/usr/include
-HOSTCFLAGS_test-statx.o += -I$(objtree)/usr/include
+userccflags += -I usr/include