From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KQR5BUcmg2q1LC0AWB0awg (envelope-from ) for ; Mon, 17 Aug 2026 11:18:31 -0400 Received: by simark.ca (Postfix, from userid 112) id 139681E167; Mon, 17 Aug 2026 11:18:31 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8D2BE1E033 for ; Mon, 17 Aug 2026 11:18:30 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2522F4BA79A2 for ; Mon, 17 Aug 2026 15:18:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2522F4BA79A2 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id E37D74BA23E6; Mon, 17 Aug 2026 15:16:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E37D74BA23E6 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E37D74BA23E6 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786979813; cv=none; b=VhiRtdZUOzhOUUSjUE95Y2Wm9psKwfuXK/EQnjFJbyYSYMN2Q0rVjAdcCxDDGhdf2b4rG6501tFxvLe6Ph3mLgX52HNel4rvKyqhr3/b+F/li8rVFQ5pS4WAMmqRe8lthHOcZ5NFd7LB6TVLrTlVaIEZP1az2PZw81cPq2MsCzU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786979813; c=relaxed/simple; bh=gyTvreXL+08kMHHZZtUiCGcZqDfdlCCeaTHbeEde7Gs=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ORj8f1eF0D0F8xa+gYr+jpNnMilDu+gTc1U8Mu8hDRVt9Yd7QoocOtinP6IwTMRfboY/BexismubWr6MjOUnwbzwfNbPjRkglBRvVPmk64XBK4RXEIcnWOAnArZYjHa3iKoRadsVtKdRtVxyINxcCF98zmz+GgL5dZDYCi8LlkM= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E37D74BA23E6 Received: by simark.ca (Postfix) id 4C4311E033; Mon, 17 Aug 2026 11:16:51 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org, binutils@sourceware.org Cc: Simon Marchi Subject: [PATCH 00/13] Fix various warnings when building on macOS Date: Mon, 17 Aug 2026 11:16:05 -0400 Message-ID: <20260817151646.152571-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org I tried a build on macOS with the following configure flags (there is no native configuration for macOS/AArch64, so I used an alternative target to at least build the generic parts of GDB): --enable-targets=all --target=x86_64-pc-linux-gnu This series fixes most of the build errors I encountered, mostly about the uses of "dangerous" functions like sprintf. There one patch in opcodes, which will require the approval from a binutils maintainer. There are 3 patches in sim, which will require the apprival from a sim maintainer. The rest is in GDB, and I would of course appreciate some reviews for those too. There are still some warnings about vfork being deprecated, like: CXX cli/cli-cmds.o /Users/smarchi/src/binutils-gdb/gdb/cli/cli-cmds.c:917:9: error: 'vfork' is deprecated: Use posix_spawn or fork [-Werror,-Wdeprecated-declarations] 917 | pid = vfork (); | ^ I have not fixed those, as it requires more thought about the consequences of changing this on all supported platforms. Simon Marchi (13): gdbsupport: remove uses of vsprintf gdbsupport: remove uses of sprintf opcodes/z80: remove use of sprintf sim/ppc: make defines.h sed command portable sim/m32r: fix unused variable warning on non-Linux hosts sim/m32r: fix unused function warnings on non-Linux hosts gdb/csky: remove uses of sprintf gdb/dwarf2: remove uses of sprintf gdb/elfread: remove use of sprintf gdbsupport: add xstrcpy gdb/remote-fileio: remove uses of sprintf gdb/remote: remove uses of sprintf gdb/tracepoint: remove uses of sprintf gdb/csky-tdep.c | 15 ++-- gdb/dwarf2/read.c | 9 ++- gdb/elfread.c | 14 ++-- gdb/fbsd-nat.c | 2 +- gdb/nat/netbsd-nat.c | 2 +- gdb/remote-fileio.c | 21 +++-- gdb/remote.c | 103 +++++++++++++------------ gdb/tracepoint.c | 25 ++++-- gdb/unittests/common-utils-selftests.c | 29 +++++++ gdbsupport/agent.cc | 2 +- gdbsupport/common-utils.cc | 31 +++++--- gdbsupport/common-utils.h | 9 +++ gdbsupport/ptid.cc | 4 +- gdbsupport/xml-utils.cc | 35 +++++---- opcodes/z80-dis.c | 52 ++++++++++++- sim/Makefile.in | 2 +- sim/m32r/traps.c | 8 +- sim/ppc/local.mk | 2 +- 18 files changed, 247 insertions(+), 118 deletions(-) base-commit: 0f9faaebc91bc1886a563bde6c178601b4be743b -- 2.55.0