From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 563623853543; Fri, 18 Aug 2023 10:07:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 563623853543 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692353272; bh=OgTq9m/qgxFP/m8rmA7M8hollDOv0ziXwt0FHRdIwV4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dN0b3LNALhBvPtt8qSQ/bvHS0AQ+fSyQP/NdvYDhNPE01X4CdLwbQlsTmdMqnf8ha 9jKaGS17oPy15mRKOyZe3hAtJkQ6/b3c+Mgv8gNsDb8V6iKK3y4uuWQPQA76SJiMv2 rv7TZdvCdwoLbmlydXrpZZIMro/VA5X+YgnZxAWc= From: "markus.t.metzger at intel dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: markus.t.metzger at intel dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30751 --- Comment #4 from Markus Metzger --- (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 thr= ead 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=3D'-O2 -flto -Wall' CXXFLAGS=3D'-O2 -flto -Wa= ll' and I get several fails, e.g. .../sim/m32r/traps.c:115:43: error: type of 'm32r2f_h_psw_get' does not mat= ch original declaration [-Werror=3Dlto-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. --=20 You are receiving this mail because: You are on the CC list for the bug.=