[Bug build/29455] [gdb/build, clang-13] undefined reference to `__atomic_load'

vries at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Tue Aug 9 08:46:21 GMT 2022


https://sourceware.org/bugzilla/show_bug.cgi?id=29455

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #5)
> I also tried building on openSUSE tumbleweed, with clang 14.0.6, where clang
> also selects gcc-12, but in this case it's the system gcc.
> 
> Same problem occurs.
> 

I managed to complete a build using:
...
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 2598b81d205..ebd7d27dc11 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -654,7 +654,7 @@ CLIBS = $(SIM) $(READLINE) $(OPCODES) $(LIBCTF) $(BFD)
$(ZLIB
) \
        $(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \
        $(WIN32LIBS) $(LIBGNU) $(LIBGNU_EXTRA_LIBS) $(LIBICONV) \
        $(LIBMPFR) $(LIBGMP) $(SRCHIGH_LIBS) $(LIBXXHASH) $(PTHREAD_LIBS) \
-       $(DEBUGINFOD_LIBS) $(LIBBABELTRACE_LIB)
+       $(DEBUGINFOD_LIBS) $(LIBBABELTRACE_LIB) -latomic
 CDEPS = $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) $(CTF_DEPS) \
        $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU) \
        $(LIBSUPPORT)
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list