Message ID | 20211127105818.299902-1-deller@gmx.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | parisc: Do not export __lshrdi3 on 64-bit with gcc >= 11 | expand |
On 2021-11-27 5:58 a.m., Helge Deller wrote: > It seems the __lshrdi3 symbol was dropped from libgcc.a from gcc-11 for > 64-bit executables. This is gcc bug. There's a typo in libgcc/config/pa/t-dimode: # Extra DImode libgcc2 functions to build. lib2difuncs = _muldi3 _negdi2 _lshrdi _ashldi3 _ashrdi3 _cmpdi2 _ucmpdi2 Will fix. __lshrdi3 isn't needed anymore for 64-bit binaries with gcc-11 and later. Not sure for other shifts but it should be possible to handle them in pa.md. Dave
On 2021-11-27 11:32 a.m., John David Anglin wrote: > On 2021-11-27 5:58 a.m., Helge Deller wrote: >> It seems the __lshrdi3 symbol was dropped from libgcc.a from gcc-11 for >> 64-bit executables. > This is gcc bug. There's a typo in libgcc/config/pa/t-dimode: > > # Extra DImode libgcc2 functions to build. > lib2difuncs = _muldi3 _negdi2 _lshrdi _ashldi3 _ashrdi3 _cmpdi2 _ucmpdi2 > > Will fix. This is now fixed in upstream gcc source. Dave
On 11/27/21 22:52, John David Anglin wrote: > On 2021-11-27 11:32 a.m., John David Anglin wrote: >> On 2021-11-27 5:58 a.m., Helge Deller wrote: >>> It seems the __lshrdi3 symbol was dropped from libgcc.a from gcc-11 for >>> 64-bit executables. >> This is gcc bug. There's a typo in libgcc/config/pa/t-dimode: >> >> # Extra DImode libgcc2 functions to build. >> lib2difuncs = _muldi3 _negdi2 _lshrdi _ashldi3 _ashrdi3 _cmpdi2 _ucmpdi2 >> >> Will fix. > This is now fixed in upstream gcc source. Thanks for fixing, Dave! So, my patch: https://patchwork.kernel.org/project/linux-parisc/patch/20211127105818.299902-1-deller@gmx.de/ and Mikulas patch: https://patchwork.kernel.org/project/linux-parisc/patch/alpine.LRH.2.02.2111270717490.10680@file01.intranet.prod.int.rdu2.redhat.com/ won't be needed. Good to know. Helge
On 2021-11-27 5:08 p.m., Helge Deller wrote: > On 11/27/21 22:52, John David Anglin wrote: >> On 2021-11-27 11:32 a.m., John David Anglin wrote: >>> On 2021-11-27 5:58 a.m., Helge Deller wrote: >>>> It seems the __lshrdi3 symbol was dropped from libgcc.a from gcc-11 for >>>> 64-bit executables. >>> This is gcc bug. There's a typo in libgcc/config/pa/t-dimode: >>> >>> # Extra DImode libgcc2 functions to build. >>> lib2difuncs = _muldi3 _negdi2 _lshrdi _ashldi3 _ashrdi3 _cmpdi2 _ucmpdi2 >>> >>> Will fix. >> This is now fixed in upstream gcc source. > Thanks for fixing, Dave! > > So, my patch: > https://patchwork.kernel.org/project/linux-parisc/patch/20211127105818.299902-1-deller@gmx.de/ > and Mikulas patch: > https://patchwork.kernel.org/project/linux-parisc/patch/alpine.LRH.2.02.2111270717490.10680@file01.intranet.prod.int.rdu2.redhat.com/ > won't be needed. Yes. I will rebuild gcc-11 with fix but that will take a day or so. In the meantime, gcc-10 should work. But it would be good to know if the shift routines in libgcc are needed with gcc-11. All the shifts should be inline. Dave
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c index 00297e8e1c88..f26c51370255 100644 --- a/arch/parisc/kernel/parisc_ksyms.c +++ b/arch/parisc/kernel/parisc_ksyms.c @@ -14,6 +14,7 @@ #include <linux/module.h> #include <linux/kernel.h> #include <linux/syscalls.h> +#include <linux/compiler.h> #include <linux/string.h> EXPORT_SYMBOL(memset); @@ -94,16 +95,19 @@ EXPORT_SYMBOL($$divI_15); extern void __ashrdi3(void); extern void __ashldi3(void); -extern void __lshrdi3(void); extern void __muldi3(void); extern void __ucmpdi2(void); EXPORT_SYMBOL(__ashrdi3); EXPORT_SYMBOL(__ashldi3); -EXPORT_SYMBOL(__lshrdi3); EXPORT_SYMBOL(__muldi3); EXPORT_SYMBOL(__ucmpdi2); +#if !(defined(CONFIG_64BIT) && (GCC_VERSION >= 110000)) +extern void __lshrdi3(void); +EXPORT_SYMBOL(__lshrdi3); +#endif + asmlinkage void * __canonicalize_funcptr_for_compare(void *); EXPORT_SYMBOL(__canonicalize_funcptr_for_compare);
It seems the __lshrdi3 symbol was dropped from libgcc.a from gcc-11 for 64-bit executables. Signed-off-by: Helge Deller <deller@gmx.de> --- arch/parisc/kernel/parisc_ksyms.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.31.1