NetBSD Problem Report #57841

From www@netbsd.org  Sat Jan 13 01:47:02 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B3C351A9238
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 13 Jan 2024 01:47:02 +0000 (UTC)
Message-Id: <20240113014701.7D8511A9239@mollari.NetBSD.org>
Date: Sat, 13 Jan 2024 01:47:01 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: netbsd-10 build fails with MKCROSSGDB=yes on gcc>=11
X-Send-Pr-Version: www-1.0

>Number:         57841
>Category:       misc
>Synopsis:       netbsd-10 build fails with MKCROSSGDB=yes on gcc>=11
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 13 01:50:00 +0000 2024
>Closed-Date:    Sun Jan 14 16:43:16 +0000 2024
>Last-Modified:  Sun Jan 14 16:43:16 +0000 2024
>Originator:     Taylor R Campbell
>Release:        10
>Organization:
The NetGDB Foundation
>Environment:
>Description:
netbsd-10 is shipping with a development snapshot of gdb, rather than a released version, for reasons opaque to me.

A development snapshot builds itself with -Werror by default.

With MKCROSSGDB=yes, the tools build uses gdb's own build system, which sets -Werror according to that rule.

The gdb code doesn't build with -Werror on gcc>=11.  Sampling of errors:

error: storing the address of local variable 'jmp_buf' in'gdb_demangle_jmp_buf' [-Werror=dangling-pointer=]
error: definition of implicit copy constructor for 'partial_die_info' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
>How-To-Repeat:
build.sh -V MKCROSSGDB=tools, on a system with gcc>=10, e.g. Ubuntu 22.04
>Fix:
Add to tools/gdb/Makefile:

CONFIGURE_ARGS+= --disable-werror

>Release-Note:

>Audit-Trail:
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57841 CVS commit: [netbsd-10] src/tools/gdb
Date: Sun, 14 Jan 2024 15:39:08 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jan 14 15:39:08 UTC 2024

 Modified Files:
 	src/tools/gdb [netbsd-10]: Makefile

 Log Message:
 Apply patch, requested by riastradh in ticket #546:

 	tools/gdb/Makefile		(apply patch)

 gdb: Fix MKCROSSGDB=yes build on gcc>=11, which raises several
 warnings that are fatal because the development snapshot of gdb
 that netbsd-10 is about to ship with sets -Werror.  This addresses
 PR misc/57841.


 To generate a diff of this commit:
 cvs rdiff -u -r1.40 -r1.40.6.1 src/tools/gdb/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sun, 14 Jan 2024 16:43:16 +0000
State-Changed-Why:
pulled up


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.