]> code.ossystems Code Review - openembedded-core.git/commit
kernel-arch: Force BFD kernel when using gcc for linking
authorKhem Raj <raj.khem@gmail.com>
Wed, 19 Aug 2015 17:44:56 +0000 (10:44 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 24 Aug 2015 22:43:27 +0000 (23:43 +0100)
commit5724e4d245f142ac6fb1ea211503fd220683354d
tree4b8c8e58fea6748c1fd3d5e50e36ae249142e0fb
parent28f261cd7da53124a5aeb71e1f473cd473a33489
kernel-arch: Force BFD kernel when using gcc for linking

We redefine LD to point to ld.bfd when building kernel, which works in
most cases since kbuild system calls out for bare LD most of the time,
however some of newer kernels e.g. 4.1+ have some code added which can
call gcc directly to do the linking job e.g. arm vdso code

This causes build failures when we have configured the default cross
toolchain to use gold linker as default. Errors like

BFD: arch/arm/vdso/vdso.so: Not enough room for program headers, try
linking with -N
| arm-angstrom-linux-gnueabi-objcopy:arch/arm/vdso/vdso.so[.hash]: Bad
value

start happening.

With this patch we force gcc to choose bfd linker as well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/kernel-arch.bbclass