* [Bug build/29455] [gdb/build, clang-13] undefined reference to `__atomic_load'
2022-08-08 8:09 [Bug build/29455] New: [gdb/build, clang-13] undefined reference to `__atomic_load' vries at gcc dot gnu.org
@ 2022-08-08 8:40 ` vries at gcc dot gnu.org
2022-08-08 9:01 ` vries at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-08-08 8:40 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29455
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Clang seems to use gcc-12, so I've tried building with gcc-12, and that went
fine.
FWIW, I've also tried playing around a bit with --gcc-toolchain to make clang
use a different gcc version, but didn't manage to get a hello world executable.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug build/29455] [gdb/build, clang-13] undefined reference to `__atomic_load'
2022-08-08 8:09 [Bug build/29455] New: [gdb/build, clang-13] undefined reference to `__atomic_load' vries at gcc dot gnu.org
2022-08-08 8:40 ` [Bug build/29455] " vries at gcc dot gnu.org
@ 2022-08-08 9:01 ` vries at gcc dot gnu.org
2022-08-08 13:43 ` tromey at sourceware dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-08-08 9:01 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29455
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
I run into the same problem with clang-8.0.1 (which also uses gcc-12).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug build/29455] [gdb/build, clang-13] undefined reference to `__atomic_load'
2022-08-08 8:09 [Bug build/29455] New: [gdb/build, clang-13] undefined reference to `__atomic_load' vries at gcc dot gnu.org
2022-08-08 8:40 ` [Bug build/29455] " vries at gcc dot gnu.org
2022-08-08 9:01 ` vries at gcc dot gnu.org
@ 2022-08-08 13:43 ` tromey at sourceware dot org
2022-08-08 15:09 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2022-08-08 13:43 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29455
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Searching suggests that perhaps with clang you need an explicit -latomic.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug build/29455] [gdb/build, clang-13] undefined reference to `__atomic_load'
2022-08-08 8:09 [Bug build/29455] New: [gdb/build, clang-13] undefined reference to `__atomic_load' vries at gcc dot gnu.org
` (2 preceding siblings ...)
2022-08-08 13:43 ` tromey at sourceware dot org
@ 2022-08-08 15:09 ` vries at gcc dot gnu.org
2022-08-09 8:33 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-08-08 15:09 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29455
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom Tromey from comment #3)
> Searching suggests that perhaps with clang you need an explicit -latomic.
I tried:
...
"CC=clang-$n" "CXX=clang++-$n" "LIBS=-latomic"
...
as configure arguments, but ran into the same trouble.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug build/29455] [gdb/build, clang-13] undefined reference to `__atomic_load'
2022-08-08 8:09 [Bug build/29455] New: [gdb/build, clang-13] undefined reference to `__atomic_load' vries at gcc dot gnu.org
` (3 preceding siblings ...)
2022-08-08 15:09 ` vries at gcc dot gnu.org
@ 2022-08-09 8:33 ` vries at gcc dot gnu.org
2022-08-09 8:46 ` vries at gcc dot gnu.org
2022-08-12 3:15 ` lienze at sourceware dot org
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-08-09 8:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29455
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
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.
In addition, we see "ld: DWARF error: invalid or unhandled FORM value: 0x23",
which is DW_FORM_rnglistx.
This is with ld v2.38. On trunk, this is something that should be (at least
partially) addressed by commit b44cfc5de13 ("Stop the linker from complaining
about unrecognised DW_FORM-rnglistx and DW_FORM_loclistx format attributes.")
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug build/29455] [gdb/build, clang-13] undefined reference to `__atomic_load'
2022-08-08 8:09 [Bug build/29455] New: [gdb/build, clang-13] undefined reference to `__atomic_load' vries at gcc dot gnu.org
` (4 preceding siblings ...)
2022-08-09 8:33 ` vries at gcc dot gnu.org
@ 2022-08-09 8:46 ` vries at gcc dot gnu.org
2022-08-12 3:15 ` lienze at sourceware dot org
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-08-09 8:46 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug build/29455] [gdb/build, clang-13] undefined reference to `__atomic_load'
2022-08-08 8:09 [Bug build/29455] New: [gdb/build, clang-13] undefined reference to `__atomic_load' vries at gcc dot gnu.org
` (5 preceding siblings ...)
2022-08-09 8:46 ` vries at gcc dot gnu.org
@ 2022-08-12 3:15 ` lienze at sourceware dot org
6 siblings, 0 replies; 8+ messages in thread
From: lienze at sourceware dot org @ 2022-08-12 3:15 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29455
Enze Li <lienze at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lienze at sourceware dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread