Skip to contentSkip to conversation

linux-yocto: Add dependency on libgcc for ARC

PATCH New Alexey Brodkin 3 participants 5 messages Feb 8, 2019 Synopsys ARC architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-yocto: Add dependency on libgcc for ARC

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 at synopsys.com>
---
 meta/recipes-kernel/linux/linux-yocto.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-kernel/linux/linux-yocto.inc +4 -0
index 1ebfb606da..f191946f2a 100644
@@ -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)}"
Signature · 1 line
2.16.2
#1 lore raw

PATCH 1/1 linux-yocto: Add dependency on libgcc for ARC

Quoted 4 lines · Alexey Brodkin

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

Quoted 29 lines
Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>
---
 meta/recipes-kernel/linux/linux-yocto.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-kernel/linux/linux-yocto.inc +4 -1
index 1ebfb606da..f191946f2a 100644
@@ -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 at lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#2 lore raw

PATCH 1/1 linux-yocto: Add dependency on libgcc for ARC

In reply to Alexey Brodkin
Quoted 5 lines · Alexey Brodkin

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.

Quoted 23 lines
Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>
---
 meta/recipes-kernel/linux/linux-yocto.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-kernel/linux/linux-yocto.inc +4 -1
index 1ebfb606da..f191946f2a 100644
@@ -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

#3 lore raw

PATCH 1/1 linux-yocto: Add dependency on libgcc for ARC

Hi Khem,

Quoted 12 lines

-----Original Message-----
From: Khem Raj <raj.khem at gmail.com>
Sent: Friday, February 8, 2019 8:28 PM
To: Alexey Brodkin <alexey.brodkin at synopsys.com>
Cc: Patches and discussions about the oe-core layer <openembedded-core at lists.openembedded.org>; Ross Burton <ross.burton at intel.com>; linux-snps-arc at lists.infradead.org; Bruce Ashfield <bruce.ashfield at windriver.com>
Subject: Re: [PATCH] linux-yocto: Add dependency on libgcc for ARC

Quoted 1 line · Alexey Brodkin
Quoted 8 lines
Quoted 4 lines

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

#4 lore raw

PATCH 1/1 linux-yocto: Add dependency on libgcc for ARC

Quoted 24 lines · Alexey Brodkin

Hi Khem,

Quoted 12 lines

-----Original Message-----
From: Khem Raj <raj.khem at gmail.com>
Sent: Friday, February 8, 2019 8:28 PM
To: Alexey Brodkin <alexey.brodkin at synopsys.com>
Cc: Patches and discussions about the oe-core layer <openembedded-core at lists.openembedded.org>; Ross Burton <ross.burton at intel.com>; linux-snps-arc at lists.infradead.org; Bruce Ashfield <bruce.ashfield at windriver.com>
Subject: Re: [PATCH] linux-yocto: Add dependency on libgcc for ARC

Quoted 1 line · Alexey Brodkin
Quoted 8 lines
Quoted 4 lines

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.

Quoted 8 lines

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.

Quoted 2 lines

-Alexey