]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
examples: make examples/ optional
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 23 Sep 2020 17:09:51 +0000 (19:09 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 8 Oct 2020 15:42:36 +0000 (11:42 -0400)
Most users don't need the standalone API examples. Distributions like SUSE
do not supply libgcc for cross-compiling and we cannot do without on ARMv8
for building examples/.

Make examples selectable via symbol CONFIG_EXAMPLES. It defaults to
yes on ARCH_QEMU to ensure that we compile the API as part of our
continuous integration.

Cc: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Kconfig
examples/Makefile

diff --git a/Kconfig b/Kconfig
index 837b2f517aeb202594ea5459a3fedb459ac2b778..1a132f90e476c7fc3fd21ea28da8e4adcc759429 100644 (file)
--- a/Kconfig
+++ b/Kconfig
@@ -422,6 +422,14 @@ config SYS_SRAM_SIZE
        default 0x10000 if TARGET_TRICORDER
        default 0x0
 
+config EXAMPLES
+       bool "Compile API examples"
+       depends on !SANDBOX
+       default y if ARCH_QEMU
+       help
+         U-Boot provides an API for standalone applications. Examples are
+         provided in directory examples/.
+
 endmenu                # General setup
 
 menu "Boot images"
index d440bc56553f9af609087baa84f536ebdb1a44b8..bf518bd221b6a5695a27853d3929237afb21acec 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 
-ifndef CONFIG_SANDBOX
+ifdef CONFIG_EXAMPLES
 
 ifdef FTRACE
 subdir-ccflags-y += -finstrument-functions -DFTRACE