Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] boot/grub2: properly handle autoreconf for target package
@ 2026-08-10 21:29 Thomas Petazzoni via buildroot
  2026-08-11 19:17 ` Julien Olivain via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-08-10 21:29 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

In commit e427f85e29f7027319a5cd1ce1024d80ef4a29ea ("boot/grub2: fix
build issue since 2.14 version bump") we added some patches that
require regenerating the configure script. Consequently, we added
GRUB2_AUTORECONF = YES and HOST_GRUB2_AUTORECONF = YES.

Except that grub2 is special. While the host package is indeed using
host-autotols-package, the target package is using generic-package,
making GRUB2_AUTORECONF = YES basically a no-op.

Except that since we're patching configure.ac, the build realize at
build time that configure is older than configure.ac, regenerates it
at that time, and re-runs the configure script without the right
environment variables causing build failures.

We fix that by doing the autoreconf step "manually" for the target
grub2 package.

Fixes:

  https://autobuild.buildroot.org/results/11802ca1762e046328df324d33a1ad813fcd92e8/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 boot/grub2/grub2.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk
index 85b3925c1e..de9f913e93 100644
--- a/boot/grub2/grub2.mk
+++ b/boot/grub2/grub2.mk
@@ -17,8 +17,8 @@ GRUB2_INSTALL_IMAGES = YES
 
 # 0001-Revert-configure-Check-linker-for-image-base-support.patch
 # 0002-Revert-configure-Print-a-more-helpful-error-if-autoc.patch
-GRUB2_AUTORECONF = YES
-GRUB2_DEPENDENCIES += host-pkgconf
+# Target grub2 package doesn't use autotools-package
+GRUB2_DEPENDENCIES += host-automake host-autoconf host-libtool host-pkgconf
 HOST_GRUB2_AUTORECONF = YES
 HOST_GRUB2_DEPENDENCIES += host-pkgconf
 
@@ -139,6 +139,7 @@ HOST_GRUB2_CONF_OPTS = \
 	--disable-werror
 
 define GRUB2_CONFIGURE_CMDS
+	cd $(@D); $(AUTORECONF)
 	$(foreach tuple, $(GRUB2_TUPLES-y), \
 		@$(call MESSAGE,Configuring $(tuple))
 		mkdir -p $(@D)/build-$(tuple)
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH] boot/grub2: properly handle autoreconf for target package
  2026-08-10 21:29 [Buildroot] [PATCH] boot/grub2: properly handle autoreconf for target package Thomas Petazzoni via buildroot
@ 2026-08-11 19:17 ` Julien Olivain via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Julien Olivain via buildroot @ 2026-08-11 19:17 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

On 10/08/2026 23:29, Thomas Petazzoni via buildroot wrote:
> In commit e427f85e29f7027319a5cd1ce1024d80ef4a29ea ("boot/grub2: fix
> build issue since 2.14 version bump") we added some patches that
> require regenerating the configure script. Consequently, we added
> GRUB2_AUTORECONF = YES and HOST_GRUB2_AUTORECONF = YES.
> 
> Except that grub2 is special. While the host package is indeed using
> host-autotols-package, the target package is using generic-package,
> making GRUB2_AUTORECONF = YES basically a no-op.
> 
> Except that since we're patching configure.ac, the build realize at
> build time that configure is older than configure.ac, regenerates it
> at that time, and re-runs the configure script without the right
> environment variables causing build failures.
> 
> We fix that by doing the autoreconf step "manually" for the target
> grub2 package.
> 
> Fixes:
> 
>   
> https://autobuild.buildroot.org/results/11802ca1762e046328df324d33a1ad813fcd92e8/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-11 19:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10 21:29 [Buildroot] [PATCH] boot/grub2: properly handle autoreconf for target package Thomas Petazzoni via buildroot
2026-08-11 19:17 ` Julien Olivain via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox