Skip to content

Commit

Permalink
samples: watchdog: use 'userprogs' syntax
Browse files Browse the repository at this point in the history
Kbuild now supports the 'userprogs' syntax to compile userspace
programs for the same architecture as the kernel.

Add the entry to samples/Makefile to put this into the build bot
coverage.

I also added the CONFIG option guarded by 'depends on CC_CAN_LINK'
because $(CC) may not provide libc.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
  • Loading branch information
masahir0y committed May 17, 2020
1 parent b98ccc7 commit 88a8e27
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 3 additions & 0 deletions samples/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,8 @@ config SAMPLE_INTEL_MEI
help
Build a sample program to work with mei device.

config SAMPLE_WATCHDOG
bool "watchdog sample"
depends on CC_CAN_LINK

endif # SAMPLES
1 change: 1 addition & 0 deletions samples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ obj-$(CONFIG_VIDEO_PCI_SKELETON) += v4l/
obj-y += vfio-mdev/
subdir-$(CONFIG_SAMPLE_VFS) += vfs
obj-$(CONFIG_SAMPLE_INTEL_MEI) += mei/
subdir-$(CONFIG_SAMPLE_WATCHDOG) += watchdog
10 changes: 2 additions & 8 deletions samples/watchdog/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# SPDX-License-Identifier: GPL-2.0
CC := $(CROSS_COMPILE)gcc
PROGS := watchdog-simple

all: $(PROGS)

clean:
rm -fr $(PROGS)

userprogs := watchdog-simple
always-y := $(userprogs)

0 comments on commit 88a8e27

Please sign in to comment.