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

Phil Blundell pb at pbcl.net
Tue Apr 1 12:19:17 UTC 2014


On Fri, 2014-03-28 at 13:28 -0400, Denys Dmytriyenko wrote:
> >  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?

Making those assignments all be conditional doesn't sound like a totally
unreasonable plan to me.  (I think it would be a bad idea to make
KERNEL_LD alone be conditional; if we change one then we should change
all four.)

Alternatively I guess you could take the view that the external
toolchain packaging ought to be providing an ld.bfd symlink if there
isn't already one.  There are other places in oe-core which mention
ld.bfd (one of them is gcc-cross-initial, which probably wouldn't be an
issue for external toolchains, but another is u-boot which might be) and
fixing the problem in the external toolchain would avoid the need to
find and fix every place that refers to ld.bfd.  So I think this would
be my preference.

p.





More information about the Openembedded-core mailing list