]> code.ossystems Code Review - openembedded-core.git/commitdiff
linux-yocto: depend on libgcc for aarch64
authorKai Kang <kai.kang@windriver.com>
Thu, 18 Dec 2014 08:50:57 +0000 (16:50 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 21 Dec 2014 17:36:01 +0000 (17:36 +0000)
Make aarch aarch64 kernel depend on libgcc.

In arch/arm64/Makefile, it adds LIBGCC to libs-y:

LIBGCC          := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
libs-y          += $(LIBGCC)

In file Makefile in top directory, libs-y is assigned to to var
KBUILD_VMLINUX_MAIN. It uses script link-vmlinux.sh to link vmlinux.o,
and when execute function vmlinux_link() in link-vmlinux.sh,
KBUILD_VMLINUX_MAIN is passed to ${LD}.

If build without libgcc, the value of LIBGCC is just libgcc.a without
parent directory. linux-yocto fails to build:

|   LD      vmlinux.o
| aarch64-poky-linux-ld.bfd: cannot find libgcc.a: No such file or directory

Add libgcc to aarch64 kernel dependency.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/linux/linux-yocto.inc

index 4ed318886f62a585419cc7e0a5a66e9a19218aae..90189857c606e82dbfa6149cdafabd1349aef0e8 100644 (file)
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 INC_PR = "r4"
 
 DEPENDS += "xz-native bc-native"
+DEPENDS_append_aarch64 = " libgcc"
 
 # A KMACHINE is the mapping of a yocto $MACHINE to what is built
 # by the kernel. This is typically the branch that should be built,