]> git.ipfire.org Git - thirdparty/grub.git/commit
configure: Add --image-base check for non-i386
authorNicholas Vinson <nvinson234@gmail.com>
Wed, 4 Mar 2026 02:41:19 +0000 (21:41 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 5 Mar 2026 13:59:22 +0000 (14:59 +0100)
commitab6f735174ba95672bcd0e96a232bcfcdecba2b7
tree3e9209bb5bce8262dd173c694c2e8b52dab9a849
parent86283bfd4ed056fba15fcbfb90b9ad91016d838a
configure: Add --image-base check for non-i386

Configure check grub_PROG_OBJCOPY_ABSOLUTE is run for all non-Apple
targets. With ld.lld-21, the check fails for addresses below image base
address (which ld.lld-21 assumes is 0x200000).

Fix by checking if linker support --image-base flag, and if it does,
include "--image-base 0" to TARGET_IMG_BASE_LDOPT.

The AX_CHECK_LINK_FLAG macro has been added to avoid a dependency on
autoconf-archive.

Note: I tried this approach with i386-pc, but I ended up with a GRUB
image that failed to boot correctly.

Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
.gitignore
configure.ac
m4/ax_check_link_flag.m4 [new file with mode: 0644]