Open drew-parsons opened 1 year ago
@drew-parsons Is this still an issue? I have just built netgen
on MacOS PowerPC (32-bit), which normally does need libatomic
linking. Looks like the build does not use 8-byte atomics.
P. S. Or maybe some of our Macports options disable usage of those.
Still needed for 6.2.2305 building with gcc 13.2.0.
ngsolve
6.2.2307 by the way needs it for sure.
Some 32 bit systems (armel, m68k, powerpc, sh4) don't link to atomic symbols. The problem is under discussion in gcc at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358
This patch works around it for netgen, linking libngcore to libatomic where needed
atomic needs to be linked to ngcore as INTERFACE not PRIVATE (or PUBLIC) since libngcore.so itself does not use atomic symbols (they are used inline in core/utils.hpp).
The cmake test for atomic linking was adapted from https://github.com/google/highway/pull/1008
Originally posted by @drew-parsons in https://github.com/NGSolve/netgen/issues/168#issuecomment-1813500874