[PATCH] Link static C++ tests against libatomic.a if needed
H.J. Lu
hjl.tools@gmail.com
Mon May 4 20:27:53 GMT 2026
On Mon, May 4, 2026 at 10:33 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Define cxx-static-link-libatomic to -latomic if DT_NEEDED entries in
> libstdc++.so include libatomic.so. Update link-extra-libs-static to
> include $(cxx-static-link-libatomic) if -lstdc++ is used.
>
> Tested with sparcv8-linux-gnu-leon3 and sparcv9-linux-gnu using
> uild-many-glibcs.py. This fixes BZ #34121.
>
FWIW, sparc g++ does pass -latomic_asneeded to ld. But glibc tests
are built with -nostdlib -nostartfiles using gcc, not g++.
--
H.J.
More information about the Libc-alpha
mailing list