Skip to content

Commit 87ffbba

Browse files
committed
samples: auxdisplay: use 'userprogs' syntax
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 <masahiroy@kernel.org> Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Acked-by: Sam Ravnborg <sam@ravnborg.org>
1 parent c4c1099 commit 87ffbba

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

‎samples/Kconfig‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ menuconfig SAMPLES
66

77
if SAMPLES
88

9+
config SAMPLE_AUXDISPLAY
10+
bool "auxdisplay sample"
11+
depends on CC_CAN_LINK
12+
913
config SAMPLE_TRACE_EVENTS
1014
tristate "Build trace_events examples -- loadable modules only"
1115
depends on EVENT_TRACING && m

‎samples/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
# Makefile for Linux samples code
33

4+
subdir-$(CONFIG_SAMPLE_AUXDISPLAY) += auxdisplay
45
obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs/
56
obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/
67
obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/

‎samples/auxdisplay/Makefile‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
CC := $(CROSS_COMPILE)gcc
3-
CFLAGS := -I../../usr/include
4-
5-
PROGS := cfag12864b-example
6-
7-
all: $(PROGS)
8-
9-
clean:
10-
rm -fr $(PROGS)
2+
userprogs := cfag12864b-example
3+
always-y := $(userprogs)

0 commit comments

Comments
 (0)