crosstool-ng/scripts/build/arch
Alexey Brodkin 028c372ba6 ARC: No more fiddling with uClibc's CONFIG_ARC_HAS_ATOMICS
Older ARC700 processors had atomic instructions (AKA llock/scond)
as an option and so quite some "atomic" operations were not possible
w/o OS support, which we implemented - see arc_usr_cmpxchg() in the
Linux kernel.

And in uClibc, which was the only Linux libc back in the day of ARC700
era, it is well supported. Well, uClibc could be configured to support it.
Which is done with CONFIG_ARC_HAS_ATOMICS Kconfig option.

But the problem is there's no check for ARC ISA version in uClibc when
this option gets enabled. That leads to a funny situation when even for
ARCv2 processors (ARC HS3x & HS4x) uClibc tries to utilize
arc_usr_cmpxchg() syscall which is not supported for this newer ISA since
ARCv2 processors have atomic instructions built-in all the time.

So what was happening here we didn't specify additional "-matomic"
CFLAG unless we were targeting exactly those ancient ARC770 processors
(ARC700 + MMUv3 + atomics) and so even for ARCv2 we forced uClibc
to not use built-in atomics.

And even though there're ways to add a smarter solution here to handle
that pretty rare by now case of ARC750 (ARC700 + MMUv2 - atomics),
I suggest we just remove this part completely, leaving a possibility
to add needed option in uClibc-ng's configuration
(I mean "packages/uClibc-ng/config").

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-08-24 09:48:56 -07:00
..
alpha.sh libc/*.sh: Deprecate libc_check_config step. 2016-08-23 11:00:27 -07:00
arc.sh ARC: No more fiddling with uClibc's CONFIG_ARC_HAS_ATOMICS 2021-08-24 09:48:56 -07:00
arm.sh arm: Disable context functions for Thumb 2020-11-01 21:17:50 +13:00
avr.sh Add config flags for omitting 'arch' and 'vendor' 2018-12-10 01:10:01 -08:00
c6x.sh c6x: Remove multilib requirement 2020-11-02 16:21:26 -05:00
m68k.sh uClibc: Split configuration tweaker into per-arch functions. 2016-08-23 11:00:27 -07:00
microblaze.sh Super-H multilib toolchain fixes 2017-09-03 12:11:23 -07:00
mips.sh Separate uclibc's multilib headers on MIPS, too 2017-05-14 00:04:05 -07:00
moxie.sh Use -mel/-meb for moxie 2018-12-07 14:49:03 -08:00
msp430.sh Added a sample of the MSP430 architecture and removed config.sub 2017-06-02 15:32:55 -07:00
nios2.sh scripts/nios2: do not override precomputed flags 2017-07-01 15:16:28 +03:00
powerpc.sh Map picolibc to suitable CT_TARGET_SYS values 2020-09-16 11:52:58 -07:00
pru.sh Add PRU cross tool target 2021-01-19 21:18:55 +02:00
riscv.sh add RISC-V architecture support 2017-11-19 04:50:14 +03:00
s390.sh Change multilib functions to set the variable. 2016-08-23 11:00:27 -07:00
sh.sh Only decorate TARGET_ARCH if using specific CPU 2018-01-21 19:45:13 -08:00
sparc.sh Add --with-cpu= on 32-bit SPARC 2020-03-03 16:40:33 -08:00
x86.sh Warn if architecture is empty on x86/32bit 2018-12-03 16:17:25 -08:00
xtensa.sh Add config flags for omitting 'arch' and 'vendor' 2018-12-10 01:10:01 -08:00