]> code.ossystems Code Review - openembedded-core.git/commitdiff
linux-yocto: depend on libgcc for nios2
authorMarek Vasut <marex@denx.de>
Sat, 19 Sep 2015 22:43:13 +0000 (00:43 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Sep 2015 22:05:44 +0000 (23:05 +0100)
Make nios2 kernel depend on libgcc.

In arch/nios2/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
| nios2-poky-linux-ld.bfd: cannot find libgcc.a: No such file or directory

Add libgcc to nios2 kernel dependency.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-kernel/linux/linux-yocto.inc

index 3b41a61c36311abdf15911f1ed048d05283f132d..81ffa24d05419b4747ba387be9441b466d30f833 100644 (file)
@@ -11,6 +11,10 @@ DEPENDS_append_aarch64 = " libgcc"
 KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
 KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
 
+DEPENDS_append_nios2 = " libgcc"
+KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
+KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
+
 # 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,
 # and it can be specific to the machine or shared