missing atomic builtins for M0
Bug #1898209 reported by
José Simões
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
I was trying to use some atomic built-ins in my code and I'm getting an error when building for M0.
The exact same code is building fine for M4.
This is the code line:
__atomic_
(I have other similar calls)
And these are the errors I'm getting:
undefined reference to `__atomic_
undefined reference to `__atomic_
undefined reference to `__atomic_
undefined reference to `__atomic_
I'm using GCC 9-2020-q2-update .
Thanks,
To post a comment you must log in.
See also https:/ /answers. launchpad. net/gcc- arm-embedded/ +question/ 616213
These functions are presumably not included in the library you are using in the linking stage. And you should actually be glad about that - because the implementations that exist in gcc for these functions are horribly wrong. They use spin locks, which are totally inappropriate for single processor systems with different priority contexts (like interrupts). If you use them, you'll get code that will appear to work, but lock your system if there happens to be contention.