All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH] boot/grub2: properly handle autoreconf for target package
Date: Mon, 10 Aug 2026 23:29:17 +0200	[thread overview]
Message-ID: <20260810212918.460215-1-thomas.petazzoni@bootlin.com> (raw)

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

                 reply	other threads:[~2026-08-10 21:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260810212918.460215-1-thomas.petazzoni@bootlin.com \
    --to=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.