Bug 28444 - gdb fails to build on ppc64le when building with -flto
Summary: gdb fails to build on ppc64le when building with -flto
Status: RESOLVED DUPLICATE of bug 22395
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 10.1
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-11 20:24 UTC by Alexandra Hájková
Modified: 2023-09-11 07:35 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandra Hájková 2021-10-11 20:24:37 UTC
gcc-11.2.1-1.fc35.ppc64le
gdb-10.2-6.fc35.ppc64le
Fedora-Rawhide

clone gdb and build it as follows

1.flags="-g3 -Og -flto" CFLAGS="$flags" CXXFLAGS="$flags" ../binutils-gdb/configure --disable-binutils --disable-elfcpp --disable-gas --disable-gold --disable-gprof --disable-ld  --enable-unit-tests --with-system-readline --with-separate-debug-dir=/usr --disable-sim
2.make -j `nproc`

results:
../../binutils-gdb/gdbserver/../gdb/arch/ppc-linux-tdesc.h:44:28: error: ‘tdesc_powerpc_isa207_htm_vsx64l’ violates the C++ One Definition Rule [-Werror=odr]
   44 | extern struct target_desc *tdesc_powerpc_isa207_htm_vsx64l;


Note:
struct target_desc is actually defined in gdb/target-descriptions.c. Not in a header.
Comment 1 Tom Tromey 2022-03-06 17:10:47 UTC
Marking as dup of the generic ODR bug.

*** This bug has been marked as a duplicate of bug 22395 ***
Comment 2 Tom de Vries 2023-09-11 07:35:04 UTC
If this still occurs, we need to reopen it.

If it does occur, please post the entire warning.