public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/112777] New: [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8
@ 2023-11-30 10:52 doko at gcc dot gnu.org
2023-11-30 12:24 ` [Bug target/112777] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: doko at gcc dot gnu.org @ 2023-11-30 10:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112777
Bug ID: 112777
Summary: [14 Regression] profiled bootstrap fails on
powerpc-linux-gnu, undefined references to
__atomic_fetch_add_8
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: doko at gcc dot gnu.org
Target Milestone: ---
trunk 20231130 fails to build on powerpc-linux-gnu in stageprofile. Not seen on
powerpc64-linux-gnu and powerpc64el-linux-gnu
make profiledbootstrap-lean
[...]
configure:3088: checking whether the C compiler works
configure:3110: /home/doko/gcc-snapshot-20231130/build/./prev-gcc/xgcc
-B/home/doko/gcc-snapshot-20231130/build/./prev-gcc/
-B/usr/lib/gcc-snapshot/powerpc-linux-gnu/bin/
-B/usr/lib/gcc-snapshot/powerpc-linux-gnu/bin/
-B/usr/lib/gcc-snapshot/powerpc-linux-gnu/lib/ -isystem
/usr/lib/gcc-snapshot/powerpc-linux-gnu/include -isystem
/usr/lib/gcc-snapshot/powerpc-linux-gnu/sys-include -fno-checking -g -O2
-fno-checking -gtoggle -fprofile-generate -static-libstdc++ -static-libgcc
-Wl,-z,relro conftest.c >&5
/usr/bin/powerpc-linux-gnu-ld:
/home/doko/gcc-snapshot-20231130/build/./prev-gcc/libgcov.a(_gcov_indirect_call_profiler_v4.o):
in function `gcov_counter_add':
/home/doko/gcc-snapshot-20231130/build/powerpc-linux-gnu/libgcc/../../../src/libgcc/libgcov.h:423:(.text+0x4bc):
undefined reference to `__atomic_fetch_add_8'
/usr/bin/powerpc-linux-gnu-ld:
/home/doko/gcc-snapshot-20231130/build/powerpc-linux-gnu/libgcc/../../../src/libgcc/libgcov.h:423:(.text+0x740):
undefined reference to `__atomic_fetch_add_8'
/usr/bin/powerpc-linux-gnu-ld:
/home/doko/gcc-snapshot-20231130/build/powerpc-linux-gnu/libgcc/../../../src/libgcc/libgcov.h:423:(.text+0x798):
undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
configure:3114: $? = 1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/112777] [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8
2023-11-30 10:52 [Bug target/112777] New: [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8 doko at gcc dot gnu.org
@ 2023-11-30 12:24 ` rguenth at gcc dot gnu.org
2023-11-30 12:37 ` doko at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-30 12:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112777
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I guess this was fixed by r14-5783-g8674d70ce37ca3?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/112777] [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8
2023-11-30 10:52 [Bug target/112777] New: [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8 doko at gcc dot gnu.org
2023-11-30 12:24 ` [Bug target/112777] " rguenth at gcc dot gnu.org
@ 2023-11-30 12:37 ` doko at gcc dot gnu.org
2023-11-30 13:44 ` sebastian.huber@embedded-brains.de
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: doko at gcc dot gnu.org @ 2023-11-30 12:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112777
--- Comment #2 from Matthias Klose <doko at gcc dot gnu.org> ---
that commit was from 20231123, my build is from 20231130, so it includes this
patch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/112777] [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8
2023-11-30 10:52 [Bug target/112777] New: [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8 doko at gcc dot gnu.org
2023-11-30 12:24 ` [Bug target/112777] " rguenth at gcc dot gnu.org
2023-11-30 12:37 ` doko at gcc dot gnu.org
@ 2023-11-30 13:44 ` sebastian.huber@embedded-brains.de
2023-12-01 8:55 ` cvs-commit at gcc dot gnu.org
2023-12-01 11:59 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: sebastian.huber@embedded-brains.de @ 2023-11-30 13:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112777
--- Comment #3 from Sebastian Huber <sebastian.huber@embedded-brains.de> ---
I think the issue is in c-cppbuiltin.cc:
builtin_define_with_int_value ("__LIBGCC_HAVE_LIBATOMIC",
targetm.have_libatomic);
Which is used in libgcov.h like this:
/* Detect whether target can support atomic update of profilers. */
#if (__SIZEOF_LONG_LONG__ == 4 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) \
|| (__SIZEOF_LONG_LONG__ == 8 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) \
|| defined (__LIBGCC_HAVE_LIBATOMIC)
#define GCOV_SUPPORTS_ATOMIC 1
#else
#define GCOV_SUPPORTS_ATOMIC 0
#endif
Should I keep the defined (__LIBGCC_HAVE_LIBATOMIC) and change c-cppbuiltin.cc
to:
if (targetm.have_libatomic)
builtin_define ("__LIBGCC_HAVE_LIBATOMIC");
Or, should I change libgcov.h to use:
#if (__SIZEOF_LONG_LONG__ == 4 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) \
|| (__SIZEOF_LONG_LONG__ == 8 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) \
|| __LIBGCC_HAVE_LIBATOMIC
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/112777] [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8
2023-11-30 10:52 [Bug target/112777] New: [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8 doko at gcc dot gnu.org
` (2 preceding siblings ...)
2023-11-30 13:44 ` sebastian.huber@embedded-brains.de
@ 2023-12-01 8:55 ` cvs-commit at gcc dot gnu.org
2023-12-01 11:59 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-01 8:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112777
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sebastian Huber <sh@gcc.gnu.org>:
https://gcc.gnu.org/g:4b8078142ee816e2bd484358b935ba1116ed9931
commit r14-6046-g4b8078142ee816e2bd484358b935ba1116ed9931
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Thu Nov 30 17:16:53 2023 +0100
gcov: Fix use of __LIBGCC_HAVE_LIBATOMIC
libgcc/ChangeLog:
PR target/112777
* libgcov.h (GCOV_SUPPORTS_ATOMIC): Honor that
__LIBGCC_HAVE_LIBATOMIC is
always defined as either 0 or 1.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/112777] [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8
2023-11-30 10:52 [Bug target/112777] New: [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8 doko at gcc dot gnu.org
` (3 preceding siblings ...)
2023-12-01 8:55 ` cvs-commit at gcc dot gnu.org
@ 2023-12-01 11:59 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-12-01 11:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112777
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
CC| |jakub at gcc dot gnu.org
Status|UNCONFIRMED |RESOLVED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-01 11:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-30 10:52 [Bug target/112777] New: [14 Regression] profiled bootstrap fails on powerpc-linux-gnu, undefined references to __atomic_fetch_add_8 doko at gcc dot gnu.org
2023-11-30 12:24 ` [Bug target/112777] " rguenth at gcc dot gnu.org
2023-11-30 12:37 ` doko at gcc dot gnu.org
2023-11-30 13:44 ` sebastian.huber@embedded-brains.de
2023-12-01 8:55 ` cvs-commit at gcc dot gnu.org
2023-12-01 11:59 ` jakub at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).