GCC-11.2.0 libatomic for bare-metal (riscv64-unknown-elf)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

When I configure and create a gcc cross-compiler for aarch64-unknown-elf, I get a valid and working libatomic.  Critically, this contains implementations of the methods that underlie the gcc atomic builtins (__atomic_load(), etc.).  I mean things like '__atomic_fetch_and_1()'.

When I do similar for riscv64-unknown-elf, I do not get libatomic. The “configure.tgt” for libatomic says that the platform is UNSUPPORTED.  The build continues, but if I use the atomic builtins, I’ll get undefined references to those underlying functions.

How can I use __atomic_store(), __atomic_exchange(), etc. on RISCV-64 bare-metal?

Thanks!
Aileen

PS: Of course RISCV supports atomic memory operations with full spectrum of dedicated instructions.  They are defined in the “A” ISA extension, but supported by all RISC-V processors I know of.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux