public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/28444] New: gdb fails to build on ppc64le when building with -flto
@ 2021-10-11 20:24 ahajkova at redhat dot com
  2022-03-06 17:10 ` [Bug gdb/28444] " tromey at sourceware dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ahajkova at redhat dot com @ 2021-10-11 20:24 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28444
           Summary: gdb fails to build on ppc64le when building with -flto
           Product: gdb
           Version: 11.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: ahajkova at redhat dot com
  Target Milestone: ---

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.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/28444] gdb fails to build on ppc64le when building with -flto
  2021-10-11 20:24 [Bug gdb/28444] New: gdb fails to build on ppc64le when building with -flto ahajkova at redhat dot com
@ 2022-03-06 17:10 ` tromey at sourceware dot org
  2023-09-11  7:35 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2022-03-06 17:10 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE
                 CC|                            |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Marking as dup of the generic ODR bug.

*** This bug has been marked as a duplicate of bug 22395 ***

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/28444] gdb fails to build on ppc64le when building with -flto
  2021-10-11 20:24 [Bug gdb/28444] New: gdb fails to build on ppc64le when building with -flto ahajkova at redhat dot com
  2022-03-06 17:10 ` [Bug gdb/28444] " tromey at sourceware dot org
@ 2023-09-11  7:35 ` vries at gcc dot gnu.org
  2026-05-07 19:39 ` keiths at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2023-09-11  7:35 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|11.2                        |10.1
                 CC|                            |vries at gcc dot gnu.org

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
If this still occurs, we need to reopen it.

If it does occur, please post the entire warning.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/28444] gdb fails to build on ppc64le when building with -flto
  2021-10-11 20:24 [Bug gdb/28444] New: gdb fails to build on ppc64le when building with -flto ahajkova at redhat dot com
  2022-03-06 17:10 ` [Bug gdb/28444] " tromey at sourceware dot org
  2023-09-11  7:35 ` vries at gcc dot gnu.org
@ 2026-05-07 19:39 ` keiths at redhat dot com
  2026-05-07 19:40 ` keiths at redhat dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: keiths at redhat dot com @ 2026-05-07 19:39 UTC (permalink / raw)
  To: gdb-prs

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

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |keiths at redhat dot com
         Resolution|DUPLICATE                   |---
             Status|RESOLVED                    |REOPENED

--- Comment #3 from Keith Seitz <keiths at redhat dot com> ---
This appears to have popped up again
(FSF master updated May 6, 2026):

  CXXLD  gdbserver
../../src/gdbserver/../gdb/arch/ppc-linux-tdesc.h:46:29: error:
‘tdesc_powerpc_isa207_htm_vsx64l’ violates the C++ One Definition Rule
[-Werror=odr]
   46 | extern const_target_desc_up tdesc_powerpc_isa207_htm_vsx64l;
      |                             ^
powerpc-isa207-htm-vsx64l-generated.cc:26:27: note:
‘tdesc_powerpc_isa207_htm_vsx64l’ was previously declared here
   26 | const struct target_desc *tdesc_powerpc_isa207_htm_vsx64l;
      |                           ^
powerpc-isa207-htm-vsx64l-generated.cc:26:27: note: code may be misoptimized
unless ‘-fno-strict-aliasing’ is used
[snip]

I'm working on a patch.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/28444] gdb fails to build on ppc64le when building with -flto
  2021-10-11 20:24 [Bug gdb/28444] New: gdb fails to build on ppc64le when building with -flto ahajkova at redhat dot com
                   ` (2 preceding siblings ...)
  2026-05-07 19:39 ` keiths at redhat dot com
@ 2026-05-07 19:40 ` keiths at redhat dot com
  2026-07-07 19:49 ` cvs-commit at gcc dot gnu.org
  2026-07-07 19:50 ` keiths at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: keiths at redhat dot com @ 2026-05-07 19:40 UTC (permalink / raw)
  To: gdb-prs

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

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |keiths at redhat dot com

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/28444] gdb fails to build on ppc64le when building with -flto
  2021-10-11 20:24 [Bug gdb/28444] New: gdb fails to build on ppc64le when building with -flto ahajkova at redhat dot com
                   ` (3 preceding siblings ...)
  2026-05-07 19:40 ` keiths at redhat dot com
@ 2026-07-07 19:49 ` cvs-commit at gcc dot gnu.org
  2026-07-07 19:50 ` keiths at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2026-07-07 19:49 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Keith Seitz <kseitz@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d839c0e5ab5a1c08d0a110b31f54d17946d4fc8b

commit d839c0e5ab5a1c08d0a110b31f54d17946d4fc8b
Author: Keith Seitz <keiths@redhat.com>
Date:   Tue Jul 7 12:10:08 2026 -0700

    regdat.sh: generate const_target_desc_up for register descriptions

    Late last year, a patch propagated the use of target_desc unique
    pointers (commit 1a5362ce51ef79ffb61caa20c93284dc368dc74a).  At the
    time, the "old regformats/regdat.sh [weren't] changed because their
    target_desc objects are statically allocated in the generated files."

    Unfortunately that re-introduced ODR violations on ppc64le:

    CXXLD  gdbserver
    ../../src/gdbserver/../gdb/arch/ppc-linux-tdesc.h:46:29: error:
âtdesc_powerpc_isa207_htm_vsx64lâ violates the C++ One Definition Rule
[-Werror=odr]
       46 | extern const_target_desc_up tdesc_powerpc_isa207_htm_vsx64l;
          |                             ^
    powerpc-isa207-htm-vsx64l-generated.cc:26:27: note:
âtdesc_powerpc_isa207_htm_vsx64lâ was previously declared here
       26 | const struct target_desc *tdesc_powerpc_isa207_htm_vsx64l;
          |                           ^
    powerpc-isa207-htm-vsx64l-generated.cc:26:27: note: code may be
misoptimized unless â-fno-strict-aliasingâ is used

    Update regdat.sh so that generated init_registers_* code matches the
    const-unique_ptr-based target description API, resolving the ODR violation.

    A follow-up patch updates various gdbserver architectures to
    accommodate this API change.

    Tested on ppc64le and s390x Fedora 43 and mips-linux
    cross build (all with LTO).

    Approved-By: Simon Marchi <simon.marchi@efficios.com>
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28444

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/28444] gdb fails to build on ppc64le when building with -flto
  2021-10-11 20:24 [Bug gdb/28444] New: gdb fails to build on ppc64le when building with -flto ahajkova at redhat dot com
                   ` (4 preceding siblings ...)
  2026-07-07 19:49 ` cvs-commit at gcc dot gnu.org
@ 2026-07-07 19:50 ` keiths at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: keiths at redhat dot com @ 2026-07-07 19:50 UTC (permalink / raw)
  To: gdb-prs

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

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Keith Seitz <keiths at redhat dot com> ---
Fixed again.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-07 19:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 20:24 [Bug gdb/28444] New: gdb fails to build on ppc64le when building with -flto ahajkova at redhat dot com
2022-03-06 17:10 ` [Bug gdb/28444] " tromey at sourceware dot org
2023-09-11  7:35 ` vries at gcc dot gnu.org
2026-05-07 19:39 ` keiths at redhat dot com
2026-05-07 19:40 ` keiths at redhat dot com
2026-07-07 19:49 ` cvs-commit at gcc dot gnu.org
2026-07-07 19:50 ` keiths at redhat dot com

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).