diff mbox series

[v2,1/1] examples: make examples/ optional

Message ID 20200923170951.21665-1-xypron.glpk@gmx.de
State Accepted
Delegated to: Tom Rini
Headers show
Series [v2,1/1] examples: make examples/ optional | expand

Commit Message

Heinrich Schuchardt Sept. 23, 2020, 5:09 p.m. UTC
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>
---
v2:
	default=y on ARCH_QEMU only
---
 Kconfig           | 8 ++++++++
 examples/Makefile | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

--
2.28.0

Comments

Tom Rini Sept. 24, 2020, 12:32 p.m. UTC | #1
On Wed, Sep 23, 2020 at 07:09:51PM +0200, Heinrich Schuchardt wrote:

> 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>
Simon Glass Sept. 24, 2020, 4:07 p.m. UTC | #2
On Wed, 23 Sep 2020 at 11:10, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> 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>
> ---
> v2:
>         default=y on ARCH_QEMU only
> ---
>  Kconfig           | 8 ++++++++
>  examples/Makefile | 2 +-
>  2 files changed, 9 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Matthias Brugger Sept. 25, 2020, 10:18 a.m. UTC | #3
On 23/09/2020 19:09, Heinrich Schuchardt wrote:
> 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: Matthias Brugger <mbrugger@suse.com>

> ---
> v2:
> 	default=y on ARCH_QEMU only
> ---
>   Kconfig           | 8 ++++++++
>   examples/Makefile | 2 +-
>   2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/Kconfig b/Kconfig
> index 883e3f71d0..d0eae2ceba 100644
> --- 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"
> diff --git a/examples/Makefile b/examples/Makefile
> index d440bc5655..bf518bd221 100644
> --- a/examples/Makefile
> +++ b/examples/Makefile
> @@ -1,6 +1,6 @@
>   # SPDX-License-Identifier: GPL-2.0+
> 
> -ifndef CONFIG_SANDBOX
> +ifdef CONFIG_EXAMPLES
> 
>   ifdef FTRACE
>   subdir-ccflags-y += -finstrument-functions -DFTRACE
> --
> 2.28.0
>
Tom Rini Oct. 9, 2020, 1:02 p.m. UTC | #4
On Wed, Sep 23, 2020 at 07:09:51PM +0200, Heinrich Schuchardt wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/Kconfig b/Kconfig
index 883e3f71d0..d0eae2ceba 100644
--- 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"
diff --git a/examples/Makefile b/examples/Makefile
index d440bc5655..bf518bd221 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,6 +1,6 @@ 
 # SPDX-License-Identifier: GPL-2.0+

-ifndef CONFIG_SANDBOX
+ifdef CONFIG_EXAMPLES

 ifdef FTRACE
 subdir-ccflags-y += -finstrument-functions -DFTRACE