[OE-core] [PATCH] kernel-arch: Always use ld.bfd to link the kernel

Denys Dmytriyenko denis at denix.org
Fri Mar 28 17:28:24 UTC 2014


On Tue, Apr 23, 2013 at 05:47:29PM +0100, Phil Blundell wrote:
> The kernel's penchant for custom linker scripts means that it doesn't
> generally get on very well with gold.  Make sure we are using the BFD
> linker here no matter what the distro default is set to.
> 
> Signed-off-by: Phil Blundell <philb at gnu.org>
> ---
>  meta/classes/kernel-arch.bbclass |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/kernel-arch.bbclass
> b/meta/classes/kernel-arch.bbclass
> index b3b71ba..4a140eb 100644
> --- a/meta/classes/kernel-arch.bbclass
> +++ b/meta/classes/kernel-arch.bbclass
> @@ -53,6 +53,6 @@ TARGET_AR_KERNEL_ARCH ?= ""
>  HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
>  
>  KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH}"
> -KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld ${HOST_LD_KERNEL_ARCH}"
> +KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
>  KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"

I know this is almost a year-old change.

The question I have is - what should one do when using an external toolchain 
that doesn't have ld.bfd provided? I know these days with gold vs. BFD linker, 
it's common to have ld.bfd, but there could be exceptions...

Should this assignment be conditional, so it's easier to override from 
local.conf or distro?

-- 
Denys



More information about the Openembedded-core mailing list