mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
samples: watch_queue: build sample program for target architecture
This userspace program includes 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 program 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>
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
# List of programs to build
|
||||
hostprogs := watch_test
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
userprogs := watch_test
|
||||
always-y := $(userprogs)
|
||||
|
||||
# Tell kbuild to always build the programs
|
||||
always-y := $(hostprogs)
|
||||
|
||||
HOSTCFLAGS_watch_test.o += -I$(objtree)/usr/include
|
||||
userccflags += -I usr/include
|
||||
|
||||
Reference in New Issue
Block a user