public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] u-boot: Ensure we use BFD as linker even if using GCC for it
@ 2024-08-30  0:43 Otavio Salvador
  2024-09-12 14:39 ` Otavio Salvador
  0 siblings, 1 reply; 2+ messages in thread
From: Otavio Salvador @ 2024-08-30  0:43 UTC (permalink / raw)
  To: openembedded-core; +Cc: Otavio Salvador, U-Boot Mailing List

If we are using 'ld-is-gold' as DISTRO_FEATURE, the U-Boot Makefile has
mechanisms to ensure that we use BFD as linker. However, this does not
work for the GCC when it is used as linking tool.

To support that, we added explicit BFD use whenever we have the
DISTRO_FEATURE feature enabled.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 meta/recipes-bsp/u-boot/u-boot.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 5a7bd6703f..ed3822784e 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -9,7 +9,8 @@ inherit uboot-config uboot-extlinux-config uboot-sign deploy python3native kerne
 
 DEPENDS += "swig-native"
 
-EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP}" V=1'
+EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} V=1'
+EXTRA_OEMAKE += 'CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)} ${DEBUG_PREFIX_MAP}"'
 EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
 EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
 
-- 
2.45.2



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

* Re: [PATCH] u-boot: Ensure we use BFD as linker even if using GCC for it
  2024-08-30  0:43 [PATCH] u-boot: Ensure we use BFD as linker even if using GCC for it Otavio Salvador
@ 2024-09-12 14:39 ` Otavio Salvador
  0 siblings, 0 replies; 2+ messages in thread
From: Otavio Salvador @ 2024-09-12 14:39 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: openembedded-core, Steve Sakoman

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

Steve,

How are you doing?

Em qui., 29 de ago. de 2024 às 21:43, Otavio Salvador <
otavio@ossystems.com.br> escreveu:

> If we are using 'ld-is-gold' as DISTRO_FEATURE, the U-Boot Makefile has
> mechanisms to ensure that we use BFD as linker. However, this does not
> work for the GCC when it is used as linking tool.
>
> To support that, we added explicit BFD use whenever we have the
> DISTRO_FEATURE feature enabled.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>

Please queue this patch as backward if possible. We are currently using a
local fix for this, but we would like to drop this when the fix lands in
the branch.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854

[-- Attachment #2: Type: text/html, Size: 1550 bytes --]

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

end of thread, other threads:[~2024-09-12 14:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30  0:43 [PATCH] u-boot: Ensure we use BFD as linker even if using GCC for it Otavio Salvador
2024-09-12 14:39 ` Otavio Salvador

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