public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "markus.t.metzger at intel dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug build/30751] [gdb/build] ODR violation for struct btrace_target_info
Date: Fri, 18 Aug 2023 10:07:51 +0000	[thread overview]
Message-ID: <bug-30751-4717-L3MHf5fio2@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30751-4717@http.sourceware.org/bugzilla/>

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

--- Comment #4 from Markus Metzger <markus.t.metzger at intel dot com> ---
(In reply to Tom Tromey from comment #3)
> Another option is to use a base class and derive the per-target classes
> from it.  'inferior' does this for private data.

I have a patch to c++ify the btrace_target_info similar to inferior and thread
private target data, but I cannot reproduce the original issue with GCC 11.4.0
on Ubuntu 22.04.

After configuring, I build GDB with:

    $ make -sj$(nproc) CFLAGS='-O2 -flto -Wall' CXXFLAGS='-O2 -flto -Wall'

and I get several fails, e.g.

.../sim/m32r/traps.c:115:43: error: type of 'm32r2f_h_psw_get' does not match
original declaration [-Werror=lto-type-mismatch]
  115 |           m32r2f_h_bpsw_set (current_cpu, m32r2f_h_psw_get
(current_cpu));

but no -Wodr warnings nor any other warnings related to btrace.

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

  parent reply	other threads:[~2023-08-18 10:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14  9:27 [Bug build/30751] New: " vries at gcc dot gnu.org
2023-08-14  9:28 ` [Bug build/30751] " vries at gcc dot gnu.org
2023-08-14  9:35 ` sam at gentoo dot org
2023-08-14 12:36 ` tromey at sourceware dot org
2023-08-14 12:56 ` vries at gcc dot gnu.org
2023-08-14 13:20 ` markus.t.metzger at intel dot com
2023-08-14 18:03 ` tromey at sourceware dot org
2023-08-18 10:07 ` markus.t.metzger at intel dot com [this message]
2023-08-18 14:12 ` tromey at sourceware dot org
2023-08-18 14:29 ` vries at gcc dot gnu.org
2023-08-18 15:56 ` vries at gcc dot gnu.org
2023-08-21  6:55 ` vries at gcc dot gnu.org
2023-09-06  7:18 ` markus.t.metzger at intel dot com
2023-09-11  6:18 ` cvs-commit at gcc dot gnu.org
2023-09-11  6:55 ` vries at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30751-4717-L3MHf5fio2@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).