[OE-core] [PATCH 3/8] linux-yocto: depend on libgcc for nios2
Khem Raj
raj.khem at gmail.com
Fri Sep 18 02:28:17 UTC 2015
> On Sep 17, 2015, at 7:11 PM, Marek Vasut <marex at denx.de> wrote:
>
> On Friday, September 18, 2015 at 03:51:30 AM, Khem Raj wrote:
>>> On Sep 17, 2015, at 6:48 PM, Marek Vasut <marex at denx.de> wrote:
>>>
>>> On Friday, September 18, 2015 at 03:43:50 AM, Khem Raj wrote:
>>>>> On Sep 17, 2015, at 6:41 PM, Marek Vasut <marex at denx.de> wrote:
>>>>>
>>>>> On Friday, September 18, 2015 at 03:40:11 AM, Khem Raj wrote:
>>>>>
>>>>> Hi!
>>>>>
>>>>>>> On Sep 17, 2015, at 7:31 AM, Marek Vasut <marex at denx.de> wrote:
>>>>>>>
>>>>>>> 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 at denx.de>
>>>>>>> ---
>>>>>>> meta/recipes-kernel/linux/linux-yocto.inc | 4 ++++
>>>>>>> 1 file changed, 4 insertions(+)
>>>>>>>
>>>>>>> diff --git a/meta/recipes-kernel/linux/linux-yocto.inc
>>>>>>> b/meta/recipes-kernel/linux/linux-yocto.inc index 3b41a61..81ffa24
>>>>>>> 100644
>>>>>>> --- a/meta/recipes-kernel/linux/linux-yocto.inc
>>>>>>> +++ b/meta/recipes-kernel/linux/linux-yocto.inc
>>>>>>> @@ -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}”
>>>>>>
>>>>>> Please try bitbake virtual/kernel build from scratch with this change.
>>>>>
>>>>> What do you mean, does it break anything or what should I expect ?
>>>>
>>>> I am not sure if there is a race, with this dependency between libgcc
>>>> and gcc-cross hopefully there is not but this will prove it.
>>>
>>> Wouldn't arm64 explode in the same way then ? I'll set up the build
>>> shortly.
>>
>> yes it would
>
> Build of virtual/kernel just finished, all good, no issues.
>
Thanks, looks good to me.
> Best regards,
> Marek Vasut
More information about the Openembedded-core
mailing list