summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-06-13 23:29:16 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-06-13 23:29:16 +0300
commit6adc19fd13f11883c44df67b551cf8201e6bba1d (patch)
tree455e80aca7b57b17069fab252261c4dcae44374d /samples
parent3df83e164f1f39c614a3f31e39164756945ae2ea (diff)
parenta7f7f6248d9740d710fd6bd190293fe5e16410ac (diff)
downloadlinux-6adc19fd13f11883c44df67b551cf8201e6bba1d.tar.xz
Merge tag 'kbuild-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull more Kbuild updates from Masahiro Yamada: - fix build rules in binderfs sample - fix build errors when Kbuild recurses to the top Makefile - covert '---help---' in Kconfig to 'help' * tag 'kbuild-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: treewide: replace '---help---' in Kconfig files with 'help' kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables samples: binderfs: really compile this sample and fix build issues
Diffstat (limited to 'samples')
-rw-r--r--samples/Kconfig2
-rw-r--r--samples/Makefile2
-rw-r--r--samples/binderfs/Makefile9
-rw-r--r--samples/binderfs/binderfs_example.c1
4 files changed, 6 insertions, 8 deletions
diff --git a/samples/Kconfig b/samples/Kconfig
index add431173bcc..f3ac549a53b0 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -185,7 +185,7 @@ config SAMPLE_VFIO_MDEV_MBOCHS
config SAMPLE_ANDROID_BINDERFS
bool "Build Android binderfs example"
- depends on ANDROID_BINDERFS
+ depends on CC_CAN_LINK && HEADERS_INSTALL
help
Builds a sample program to illustrate the use of the Android binderfs
filesystem.
diff --git a/samples/Makefile b/samples/Makefile
index 5b2629778754..754553597581 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -2,7 +2,7 @@
# Makefile for Linux samples code
subdir-$(CONFIG_SAMPLE_AUXDISPLAY) += auxdisplay
-obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs/
+subdir-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs
obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/
obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/
subdir-$(CONFIG_SAMPLE_HIDRAW) += hidraw
diff --git a/samples/binderfs/Makefile b/samples/binderfs/Makefile
index a3ac5476338a..989e4badaee2 100644
--- a/samples/binderfs/Makefile
+++ b/samples/binderfs/Makefile
@@ -1,6 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-ifndef CROSS_COMPILE
-ifdef CONFIG_SAMPLE_ANDROID_BINDERFS
-hostprogs := binderfs_example
-endif
-endif
+userprogs := binderfs_example
+always-y := $(userprogs)
+
+userccflags += -I usr/include
diff --git a/samples/binderfs/binderfs_example.c b/samples/binderfs/binderfs_example.c
index 5bbd2ebc0aea..0fd92cdda460 100644
--- a/samples/binderfs/binderfs_example.c
+++ b/samples/binderfs/binderfs_example.c
@@ -18,7 +18,6 @@
int main(int argc, char *argv[])
{
int fd, ret, saved_errno;
- size_t len;
struct binderfs_device device = { 0 };
ret = unshare(CLONE_NEWNS);