diff mbox series

[1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains

Message ID 20221111215759.358116-1-thomas.petazzoni@bootlin.com
State Accepted
Headers show
Series [1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains | expand

Commit Message

Thomas Petazzoni Nov. 11, 2022, 9:57 p.m. UTC
Commit 4cbf7336914f25478aea943456ba7dc3c892c21a ("arch/xtensa: custom
configuration requires an overlay") added a check in
arch/arch.mk.xtensa to bail out if a custom Xtensa core is selected
but not overlay file is provided. While this is indeed a perfectly
valid check to make when building an internal toolchain, with an
external toolchain it's entirely possible to build with no overlay
file: the toolchain already exists, and there's no overlay to be
applied in the context of the Buildroot build.

And indeed commit 4cbf7336914f25478aea943456ba7dc3c892c21a broke some
of the runtime test cases that use a custom Xtensa core configuration,
with no overlay, to test the toolchains.bootlin.com Xtensa external
toolchain. By relaxing the check to only apply to internal toolchain
configurations, we fix those test cases.

Fixes:

  https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261966
  https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261963

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 arch/arch.mk.xtensa | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yann E. MORIN Nov. 13, 2022, 9:39 p.m. UTC | #1
Thomas, All,

On 2022-11-11 22:57 +0100, Thomas Petazzoni spake thusly:
> Commit 4cbf7336914f25478aea943456ba7dc3c892c21a ("arch/xtensa: custom
> configuration requires an overlay") added a check in
> arch/arch.mk.xtensa to bail out if a custom Xtensa core is selected
> but not overlay file is provided. While this is indeed a perfectly
> valid check to make when building an internal toolchain, with an
> external toolchain it's entirely possible to build with no overlay
> file: the toolchain already exists, and there's no overlay to be
> applied in the context of the Buildroot build.
> 
> And indeed commit 4cbf7336914f25478aea943456ba7dc3c892c21a broke some
> of the runtime test cases that use a custom Xtensa core configuration,
> with no overlay, to test the toolchains.bootlin.com Xtensa external
> toolchain. By relaxing the check to only apply to internal toolchain
> configurations, we fix those test cases.

I've added a blurb explaining that we can still build gdb with no
overlay in that case, which amounts to building for the fsf variant,
which may cause failures like what 4cbf7336914f was supposed to fix to
begin with. Ditto, I added blurb about building the kernel wihtout an
overlay, but that is less problematic in fact.

> Fixes:
> 
>   https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261966
>   https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261963
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  arch/arch.mk.xtensa | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arch.mk.xtensa b/arch/arch.mk.xtensa
> index 7b6c59cecd..75145e725f 100644
> --- a/arch/arch.mk.xtensa
> +++ b/arch/arch.mk.xtensa
> @@ -1,6 +1,6 @@
>  BR_ARCH_XTENSA_OVERLAY_FILE = $(call qstrip,$(BR2_XTENSA_OVERLAY_FILE))
>  
> -ifeq ($(BR_BUILDING)$(BR2_XTENSA_CUSTOM):$(BR_ARCH_XTENSA_OVERLAY_FILE),yy:)
> +ifeq ($(BR_BUILDING)$(BR2_XTENSA_CUSTOM)$(BR2_TOOLCHAIN_BUILDROOT):$(BR_ARCH_XTENSA_OVERLAY_FILE),yyy:)
>  $(error No xtensa overlay file provided. Check your BR2_XTENSA_OVERLAY_FILE setting)
>  endif
>  
> -- 
> 2.38.1
>
Peter Korsgaard Nov. 15, 2022, 1:22 p.m. UTC | #2
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > Commit 4cbf7336914f25478aea943456ba7dc3c892c21a ("arch/xtensa: custom
 > configuration requires an overlay") added a check in
 > arch/arch.mk.xtensa to bail out if a custom Xtensa core is selected
 > but not overlay file is provided. While this is indeed a perfectly
 > valid check to make when building an internal toolchain, with an
 > external toolchain it's entirely possible to build with no overlay
 > file: the toolchain already exists, and there's no overlay to be
 > applied in the context of the Buildroot build.

 > And indeed commit 4cbf7336914f25478aea943456ba7dc3c892c21a broke some
 > of the runtime test cases that use a custom Xtensa core configuration,
 > with no overlay, to test the toolchains.bootlin.com Xtensa external
 > toolchain. By relaxing the check to only apply to internal toolchain
 > configurations, we fix those test cases.

 > Fixes:

 >   https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261966
 >   https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261963

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2022.08.x and 2022.02.x, thanks.
diff mbox series

Patch

diff --git a/arch/arch.mk.xtensa b/arch/arch.mk.xtensa
index 7b6c59cecd..75145e725f 100644
--- a/arch/arch.mk.xtensa
+++ b/arch/arch.mk.xtensa
@@ -1,6 +1,6 @@ 
 BR_ARCH_XTENSA_OVERLAY_FILE = $(call qstrip,$(BR2_XTENSA_OVERLAY_FILE))
 
-ifeq ($(BR_BUILDING)$(BR2_XTENSA_CUSTOM):$(BR_ARCH_XTENSA_OVERLAY_FILE),yy:)
+ifeq ($(BR_BUILDING)$(BR2_XTENSA_CUSTOM)$(BR2_TOOLCHAIN_BUILDROOT):$(BR_ARCH_XTENSA_OVERLAY_FILE),yyy:)
 $(error No xtensa overlay file provided. Check your BR2_XTENSA_OVERLAY_FILE setting)
 endif