https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58938
--- Comment #15 from Philip Deegan <philip.deegan at gmail dot com> --- Hi, thanks for the quick reply. Yeah I tried with atomic, not much different shared or static, is something special required when building gcc/libc? Linking with --verbose results in: -lmy_lib -latomic -lstdc++ -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc /opt/gcc_5.3_ARM32HF/lib/gcc/arm-linux-gnueabihf/5.3.0/crtend.o I'm happy to open another ticket/take this somewhere else.