`cmake 3.27.3` linking fails for armv6 due to missing `libatomic`
As advised in !8663 (comment 1405445) creating issue for linking failure when targeting armv6
. This CPU is not included on the applicable list for libatomic
even though it should:
https://gitlab.kitware.com/cmake/cmake/-/blob/caace038e5c23a0d97a311d42098f34bf441113b/Source/Checks/cm_cxx_features.cmake#L99-L105
On the other hand armv7l
is present which does implement 64-bit atomics and therefore does not require libatomic
(validated it in my env since I build packages for armv7
as well). I would vote for dropping CPU check entirely. Argument stated in comment about cost of compilation is not very convincing as far as I'm concerned. It's not even measurable but guarantees build correctness. The alternative is to list all possible combinations of target architectures that do not implement 64-bit atomics like i386
, i486
, armv4
, armv5
, armv6
, mips
(32-bit, which might possibly be expressed as mips32
), ppc
(32-bit, which might possibly be expressed as ppc32). Also note that there are various combinations of armv[456]
so they should rather be wildcard/regular expresion matching prefix only armv[456].*
. Not counting those that I forgot and am unaware of.