From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id rzZRDxIiXmhoUSEAWB0awg (envelope-from ) for ; Fri, 27 Jun 2025 00:46:10 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=PFaxZwuH; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2D77F1E11E; Fri, 27 Jun 2025 00:46:10 -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.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_SBL_CSS,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 3205E1E089 for ; Fri, 27 Jun 2025 00:46:06 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AC64B3854804 for ; Fri, 27 Jun 2025 04:46:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC64B3854804 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=PFaxZwuH Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 9DF353854A8E for ; Fri, 27 Jun 2025 04:45:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9DF353854A8E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9DF353854A8E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::630 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750999536; cv=none; b=Y91R8BjYP7q+FL7BTVZytSOvwNpiBDmFI8lA55zDPiB8zCyNcJxCNOWoc+DP7VPcZZsdpvHunlZJw3w82gffc+QFXRxgW1MyHLnZhhVOP/jRqOXL7Y2LQybAsNrVa7J0gnoHf2fFvnv2R7ICBq/QfGOqFwQgiREdQzMkYtizSHI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750999536; c=relaxed/simple; bh=Ur7Ks3LxMTmbvAHLtJWAnueEQuN+keWAJ/sw211mUF0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=R98teJDVVMlHvufuRVwuHc0HSk/P+Bz7s5Oz8SOzFw/uYytcuylozFbw45Jr2NJeO0BUvrlzA8frY624PzyXxMBZNOwpbu1eglUUhGEO7g9SZgiHjiXs5Gbm/JW9I9VYvfJj5BzG0sMN66uf1zdr2Ulas9u8JDUq1Lt2mghKRjQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9DF353854A8E Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-236377f00a1so20155375ad.3 for ; Thu, 26 Jun 2025 21:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750999536; x=1751604336; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=8dWwltQU0+QovlT71j0WlUwLy1i8s/1kHz5pJR7TFUk=; b=PFaxZwuHmYzVEBbSCydDYkqjA6c0LXTvGLb15SyJWI5E7filWLQjZtaZ86GUcLbZBz E1gFaPuULMqCHTqpazsrkOYYHJ81KtpxRyZoI7xsOMBJF/oJN2D7Q94Wi7eoc/lzzX9f cBYw2MRZHrfv4uSkWpsFFcxM+W843klcxhmO85dAjQu60ybJdHSP96Z8X8BGu6XJLLZM bDPCnh09gMQtZy+W77F6BPcsiAdDaEvGN1znhGtlNJMA5pdGAxp6ICGdIgQCkL+P/qgC V2IawR4W8mlgX86j+L05/aJeIBOH5X65Yfb0dRYQKEBII52jDTRSRqhr9vIksk2W+TTX Cp8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750999536; x=1751604336; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8dWwltQU0+QovlT71j0WlUwLy1i8s/1kHz5pJR7TFUk=; b=PKwvxpNVxRcES8CIJ1VBXQRc9w/MNPVvkEK6XSSfs71wStFEry4R6Nn61O0Ncod7km cXBSUSfIDpIWEk57S6bZKUyQkufn+vKy6ZqfHX3gfzRSQy4yvyq26Ei1HI6E8AErGz79 35pffJ0fVUxhWPjURrWUjqnYhY2jMDIPjs5d5PQwBvbt91AAaIh/yntQxf1c4vLx9dEe ZyrtnybjGHrMtRkdQX8A9Fa1NqMRzkFaAjk5LP2j++vb9AwbaW83jIkvRzeKe0ACyflN phUWXLgVw/9hZOHVvkq8HqZQadHr+0qp4IHMnvcj4c9GeJB32wULrmFbbS2DOrlrDkH6 x6tQ== X-Gm-Message-State: AOJu0Yz4RtS9HxP0mOeVN3tTYEvn+FI5KmnY+GyEOKL57/aL79o/yEPz ubP1JJjhrCCv/5FRy4xoIrU0NJ+Jc3SiKYBvaMNhrNKe3umVKGRK/qp7IW8Ma/DgtbPPkx+Pzt2 CNc94 X-Gm-Gg: ASbGncshu87bEWH6gisSLQXG2iAL5F3UTpDvNltX/BAti/ZOa598Vw7amlSFiKEYRn4 JVFf6jatpDHFgFqmJAxQv6EyowdPzqjnW+rCgHkYTukAB75D6A+a8zh5IYnEJuXqvVSQ72lN7nS uYl/b/ZtZXLORi/hwEoglZL1fPRkOdIbhLRmLL/3cwePiYNqBfKRp9Tb6M67HejxmU8YC/CvTH4 uHpi8gPZR1Wmn8m/ghRVem0t2pT4r6ZdUzGvfA3qLlTO9YnYpd2SOcKRWOpwenIssHNPvFtTy+z vlF3Obd5BMXvKblTPXoIUIAePhoyeQYisP3LL7A9Y1lEozwdfzwzfTM55GCLE6j2WAKDe7D4 X-Google-Smtp-Source: AGHT+IGsY3mkLzy7xW4U8EEWZfDR4bDQlFhvq+u5Y/7R1f52F8Klo4VwpfMHofpGwXd2qn3rpnV14Q== X-Received: by 2002:a17:903:1aa6:b0:234:d292:be7f with SMTP id d9443c01a7336-23ac4632e30mr24842145ad.31.1750999535709; Thu, 26 Jun 2025 21:45:35 -0700 (PDT) Received: from localhost ([2804:14d:7e39:88d6:f78b:b606:3f5e:ac5f]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-23acb3c54b8sm6592715ad.217.2025.06.26.21.45.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jun 2025 21:45:35 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Subject: [PATCH] GDB: maint: Fix build on FreeBSD Date: Fri, 27 Jun 2025 01:45:33 -0300 Message-ID: <20250627044533.1246090-1-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.49.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 While trying to build current trunk of GDB on FreeBSD 14.3 on aarch64, I hit this warning converted to an error: In file included from /home/bauermann/src/binutils-gdb/gdb/maint.c:37: /home/bauermann/src/binutils-gdb/gdb/maint.h:64:8: error: private field 'm_start_space' is not used [-Werror,-Wunused-private-field] 64 | long m_start_space; | ^ 1 error generated. gmake[2]: *** [Makefile:1973: maint.o] Error 1 I used the default compiler on this system: $ c++ --version FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2) Target: aarch64-unknown-freebsd14.3 Thread model: posix InstalledDir: /usr/bin The problem is that the only two places that use m_start_space are guarded by HAVE_USEFUL_SBRK, so also guard the member declaration with it. Build-tested on aarch64-unknown-freebsd14.3. --- gdb/maint.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/maint.h b/gdb/maint.h index cccb6f60354f..693001801b2c 100644 --- a/gdb/maint.h +++ b/gdb/maint.h @@ -61,7 +61,9 @@ class scoped_command_stats bool m_symtab_enabled : 1; run_time_clock::time_point m_start_cpu_time; std::chrono::steady_clock::time_point m_start_wall_time; +#ifdef HAVE_USEFUL_SBRK long m_start_space; +#endif /* Total number of symtabs (over all objfiles). */ int m_start_nr_symtabs; /* A count of the compunits. */