arc700 + glibc fails

Rosen Penev rosenp at gmail.com
Wed Dec 23 22:45:36 EST 2020


On Wed, Dec 23, 2020 at 6:54 AM Hauke Mehrtens <hauke at hauke-m.de> wrote:
>
> Hi,
>
> ARC was switched from uClibc to glibc here:
> https://git.openwrt.org/95f1002acab574c24ad78f4453f091bf5a6731c7
> uClibc support was removed from OpenWrt in the next commit.
>
> It looks like arc700 is not supported by glibc 2.32, only ARC HS38 is
> supported.
>
> On the arc770 target I am getting this compiler errors in the glibc:
> -----------------
> msort.c: Assembler messages:
> msort.c:201: Error: opcode 'dmb' not supported for target arc700
> -----------------
> http://buildbot.openwrt.org/master/images/builders/arc770%2Fgeneric/builds/749
>
> After this one is fixed I get this one:
> -----------------
> ../sysdeps/unix/sysv/linux/arc/syscall.S: Assembler messages:
> ../sysdeps/unix/sysv/linux/arc/syscall.S:27: Error: register must be
> either r0-r3 or r12-r15 for instruction 'mov_s'
> ../sysdeps/unix/sysv/linux/arc/syscall.S:28: Error: register must be
> either r0-r3 or r12-r15 for instruction 'mov_s'
> ---------------------
>
> Does anyone plan to fix glibc with arc700 or should we just remove the
> arc770 target, the arhs38 target is compiling?
I'll look into it. My vote is to remove support for ARC altogether as
it doesn't seem any hardware uses it except for some dev kits.
>
> I think the archs38 target was not runtime tested with glibc, could
> someone with access to the hardware please check if it is still working
> with glibc in master. gdbserver also got ARC support please also check
> if this now works and we can remove the dependency on !arc.
>
> Hauke
>
>
> This fixes the first build problem:
> ------------------------
> --- a/sysdeps/arc/atomic-machine.h
> +++ b/sysdeps/arc/atomic-machine.h
> @@ -64,6 +64,10 @@
>     __atomic_val_bysize (__arch_compare_and_exchange_val, int,          \
>                        mem, new, old, __ATOMIC_ACQUIRE)
>
> +#ifdef __ARCHS__
>   #define atomic_full_barrier()  ({ asm volatile ("dmb 3":::"memory"); })
> +#else
> +#define atomic_full_barrier()  ({ asm volatile ("sync":::"memory"); })
uClibc-ng uses __asm__ __volatile__("": : :"memory"). No idea if bug or not.
> +#endif
>
>   #endif /* _ARC_BITS_ATOMIC_H */
> ------------------------
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list