linux-yocto: Add dependency on libgcc for ARC

Submitted by Alexey Brodkin on Feb. 8, 2019, 3:32 p.m. | Patch ID: 158618

Details

Message ID 20190208153221.4335-1-abrodkin@synopsys.com
State Accepted
Commit 4f582a1123be0cc56abab324c5eb16ad03906857
Headers show

Commit Message

Alexey Brodkin Feb. 8, 2019, 3:32 p.m.
As of now in case of ARC there's no in-kernel implementation of basic libgcc
functions used for millicode, multiplication, division etc instead we simply
link with libgcc.a which provides everything used by the compiler.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
 meta/recipes-kernel/linux/linux-yocto.inc | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 1ebfb606da..f191946f2a 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -26,6 +26,10 @@  DEPENDS_append_nios2 = " libgcc"
 KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
 KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
 
+DEPENDS_append_arc = " libgcc"
+KERNEL_CC_append_arc = " ${TOOLCHAIN_OPTIONS}"
+KERNEL_LD_append_arc = " ${TOOLCHAIN_OPTIONS}"
+
 KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc"
 
 KERNEL_FEATURES_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}"

Comments

Bruce Ashfield Feb. 8, 2019, 3:42 p.m.
On Fri, Feb 8, 2019 at 10:32 AM Alexey Brodkin
<alexey.brodkin@synopsys.com> wrote:
>
> As of now in case of ARC there's no in-kernel implementation of basic libgcc
> functions used for millicode, multiplication, division etc instead we simply
> link with libgcc.a which provides everything used by the compiler.

I'll grab this for my queue.

Cheers,

Bruce

>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> ---
>  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 1ebfb606da..f191946f2a 100644
> --- a/meta/recipes-kernel/linux/linux-yocto.inc
> +++ b/meta/recipes-kernel/linux/linux-yocto.inc
> @@ -26,6 +26,10 @@ DEPENDS_append_nios2 = " libgcc"
>  KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
>  KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
>
> +DEPENDS_append_arc = " libgcc"
> +KERNEL_CC_append_arc = " ${TOOLCHAIN_OPTIONS}"
> +KERNEL_LD_append_arc = " ${TOOLCHAIN_OPTIONS}"
> +
>  KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc"
>
>  KERNEL_FEATURES_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}"
> --
> 2.16.2
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Feb. 8, 2019, 5:28 p.m.
On Fri, Feb 8, 2019 at 7:32 AM Alexey Brodkin
<alexey.brodkin@synopsys.com> wrote:
>
> As of now in case of ARC there's no in-kernel implementation of basic libgcc
> functions used for millicode, multiplication, division etc instead we simply
> link with libgcc.a which provides everything used by the compiler.
>

this is something you would be fixing in kernel eventually?
we can carry this as a workaround until then but it really needs to be
fixed in kernel.

> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> ---
>  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 1ebfb606da..f191946f2a 100644
> --- a/meta/recipes-kernel/linux/linux-yocto.inc
> +++ b/meta/recipes-kernel/linux/linux-yocto.inc
> @@ -26,6 +26,10 @@ DEPENDS_append_nios2 = " libgcc"
>  KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
>  KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
>
> +DEPENDS_append_arc = " libgcc"
> +KERNEL_CC_append_arc = " ${TOOLCHAIN_OPTIONS}"
> +KERNEL_LD_append_arc = " ${TOOLCHAIN_OPTIONS}"
> +
>  KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc"
>
>  KERNEL_FEATURES_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}"
> --
> 2.16.2
>
Alexey Brodkin Feb. 8, 2019, 5:34 p.m.
Hi Khem,

> -----Original Message-----
> From: Khem Raj <raj.khem@gmail.com>
> Sent: Friday, February 8, 2019 8:28 PM
> To: Alexey Brodkin <alexey.brodkin@synopsys.com>
> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org>; Ross
> Burton <ross.burton@intel.com>; linux-snps-arc@lists.infradead.org; Bruce Ashfield
> <bruce.ashfield@windriver.com>
> Subject: Re: [PATCH] linux-yocto: Add dependency on libgcc for ARC
> 
> On Fri, Feb 8, 2019 at 7:32 AM Alexey Brodkin
> <alexey.brodkin@synopsys.com> wrote:
> >
> > As of now in case of ARC there's no in-kernel implementation of basic libgcc
> > functions used for millicode, multiplication, division etc instead we simply
> > link with libgcc.a which provides everything used by the compiler.
> >
> 
> this is something you would be fixing in kernel eventually?
> we can carry this as a workaround until then but it really needs to be
> fixed in kernel.

Well we do have it in our plans but given this is more a nice feature
than something critical (as currently used approach with libgcc works
perfectly fine) it might not be done very soon.

Thus we'll need to keep this work-around for now.

BTW exporting of libgcc parts into kernel means we'll need to
keep it in sync with real libgcc later which is not optimal as well.

-Alexey
Khem Raj Feb. 8, 2019, 5:41 p.m.
On Fri, Feb 8, 2019 at 9:35 AM Alexey Brodkin
<alexey.brodkin@synopsys.com> wrote:
>
> Hi Khem,
>
> > -----Original Message-----
> > From: Khem Raj <raj.khem@gmail.com>
> > Sent: Friday, February 8, 2019 8:28 PM
> > To: Alexey Brodkin <alexey.brodkin@synopsys.com>
> > Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org>; Ross
> > Burton <ross.burton@intel.com>; linux-snps-arc@lists.infradead.org; Bruce Ashfield
> > <bruce.ashfield@windriver.com>
> > Subject: Re: [PATCH] linux-yocto: Add dependency on libgcc for ARC
> >
> > On Fri, Feb 8, 2019 at 7:32 AM Alexey Brodkin
> > <alexey.brodkin@synopsys.com> wrote:
> > >
> > > As of now in case of ARC there's no in-kernel implementation of basic libgcc
> > > functions used for millicode, multiplication, division etc instead we simply
> > > link with libgcc.a which provides everything used by the compiler.
> > >
> >
> > this is something you would be fixing in kernel eventually?
> > we can carry this as a workaround until then but it really needs to be
> > fixed in kernel.
>
> Well we do have it in our plans but given this is more a nice feature
> than something critical (as currently used approach with libgcc works
> perfectly fine) it might not be done very soon.
>
> Thus we'll need to keep this work-around for now.
>
> BTW exporting of libgcc parts into kernel means we'll need to
> keep it in sync with real libgcc later which is not optimal as well.

aarch64 kernel also bootstrapped with lbgcc for quite a while and then
moved away
I can understand that there might be bigger fish to fry, but this is
not a insignificant issue
where you make kernel dependency on toolchain runtime go away.

>
> -Alexey