https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96845
Bug ID: 96845 Summary: undefined reference to `__aarch64_ldadd4_acq_rel' Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcc Assignee: unassigned at gcc dot gnu.org Reporter: bero at lindev dot ch Target Milestone: --- When compiling some packages on aarch64 (e.g. polkit-qt-1 0.113.0) on aarch64, the build errors out with /usr/lib64/gcc/aarch64-openmandriva-linux-gnu/10.2.0/../../../../aarch64-openmandriva-linux-gnu/bin/ld: core/CMakeFiles/polkit-qt5-core-1.dir/polkitqt1-authority.cpp.o: in function `std::__atomic_base<int>::operator++()': /usr/include/c++/10.2.0/bits/atomic_base.h:326: undefined reference to `__aarch64_ldadd4_acq_rel' This seems to be caused by __aarch64_ldadd4_acq_rel being defined in libgcc, but not libgcc_s, while only libgcc_s is pulled in automatically. Some Linux distributions have a workaround for this in their gcc packaging - they replace libgcc_s.so with an ld script that pulls in libgcc if needed (see e.g. https://src.fedoraproject.org/rpms/gcc/blob/master/f/gcc.spec#_1303 )