summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-09-08 14:06:56 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-09-11 11:31:57 +0100
commit0f288ce34e5737fdb97a766d10a9d9d8e5b6f9b0 (patch)
tree081b210d27fdd7dd35eebfd1ac7249d1491a1355
parentffe0aa9cda0e99ecea5cd62d85e0a98d5c839c6e (diff)
downloadpoky-0f288ce34e5737fdb97a766d10a9d9d8e5b6f9b0.tar.gz
grub,grub-efi: Always use BFD linker with clang
LLD 21+ is erroring on text address being lower than the default segment address for binaries. Erroring during configure e.g. cannot link at address 0x2000 With LLD 21, -Ttext,<addr> only moves the .text section it does not change the image base and LLD 21 errors out if any section VMA is below the image base and the segment (image) base still defaults to 0x400000 when using LLD, hence the error LLD support in Grub needs to be done properly, it will need to adjust how linker options are constructed in configure. We default to use BFD linker always when using clang for now. (From OE-Core rev: d1194c1a42fc7877a0c99c77e5291216a11ea5dc) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/grub/grub2.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index b512cbeb45..14edda334a 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -73,6 +73,7 @@ CFLAGS:remove = "-O2"
73# CFLAGS += -mno-mmx -mno-sse 73# CFLAGS += -mno-mmx -mno-sse
74# So also remove -mfpmath=sse from TUNE_CCARGS 74# So also remove -mfpmath=sse from TUNE_CCARGS
75TUNE_CCARGS:remove = "-mfpmath=sse" 75TUNE_CCARGS:remove = "-mfpmath=sse"
76TUNE_CCARGS:append:toolchain-clang = " -fuse-ld=bfd -Wno-error=unused-command-line-argument"
76 77
77EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \ 78EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
78 --disable-grub-mkfont \ 79 --disable-grub-mkfont \