arc700 + glibc fails

Hauke Mehrtens hauke at hauke-m.de
Wed Dec 23 09:36:19 EST 2020


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 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"); })
+#endif

  #endif /* _ARC_BITS_ATOMIC_H */
------------------------



More information about the openwrt-devel mailing list