From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id obBSG87NlWqVRRgAWB0awg (envelope-from ) for ; Mon, 31 Aug 2026 14:54:06 -0400 Received: by simark.ca (Postfix, from userid 112) id 6BB0F1E033; Mon, 31 Aug 2026 14:54:06 -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 [IPv6:2620:52:6:3111::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 BA4D21E033 for ; Mon, 31 Aug 2026 14:54:05 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 79B854BA799E for ; Mon, 31 Aug 2026 18:54:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 79B854BA799E Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 4E1CA4BA23C4 for ; Mon, 31 Aug 2026 18:53:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4E1CA4BA23C4 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 4E1CA4BA23C4 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=1788202387; cv=none; b=OVMdd1U9jsCCAC5SO34ylTXfuTfJJIg8+bpIQbbppLgx1qNJyVMQdvycpuXj3Eejgpfq1BKByxpw9stqNB8kFzsVnh53sMw3cLDW419HryK2MwQ53xdAweuiR9joMLDD1kONYMi+6gGbf24AhGiTy7uK9ogirjzwyTFGETJ8dJk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788202387; c=relaxed/simple; bh=0eUnB4jRajbuhps7383Ald/ABTi6ULTkFQRqnsMXaMw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=K8JKhJycbVn4x/exPa/WXL6p7bI2gvj+Na1h6IJL1nMt8vOtlND2eFSS6z5KnDagTPIQ2ey0KZsGLfOwxB5ELP5mH5+lzFIH474pdu/gN9HXDIcvXr7tKgK05rrqs0KvrdHpcwpa9vw7b5KJlI5BbUHsV4O/M31CW9/tRhtaK9Y= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E1CA4BA23C4 Received: by simark.ca (Postfix) id B40871E168; Mon, 31 Aug 2026 14:53:05 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 4/7] gdb, gdbserver: always use order-only prerequisites for generated files Date: Mon, 31 Aug 2026 14:51:43 -0400 Message-ID: <20260831185300.572297-5-simon.marchi@efficios.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260831185300.572297-1-simon.marchi@efficios.com> References: <20260831185300.572297-1-simon.marchi@efficios.com> 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 Both gdb/Makefile.in and gdbserver/Makefile.in guard their use of order-only prerequisites behind a check for the .VARIABLES variable, falling back to a normal prerequisite when it is not defined: # Ensure that generated files are created early. Use order-only # dependencies if available. They require GNU make 3.80 or newer, # and the .VARIABLES variable was introduced at the same time. ifdef .VARIABLES $(all_object_files): | $(generated_files) else $(all_object_files) : $(generated_files) endif Building GDB requires GNU make >= 3.82, as documented in gdb/NEWS and (as of the previous patch) in gdb/README. On top of that, gdb/Makefile.in already uses an order-only prerequisite unconditionally, in the rule for compiling .c files in the top-level gdb directory: %.o: %.c | $(CONFIG_DEP_SUBDIR) Remove the conditional and trim the comment accordingly. Change-Id: Ic5cca15f21dc1a4908f978c788f416780ea1b5cd --- gdb/Makefile.in | 8 +------- gdbserver/Makefile.in | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 5741ee5e2e92..cdf73ec708e0 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2837,14 +2837,8 @@ all_object_files = gdb.o $(LIBGDB_OBS) gdbtk/generic/gdbtk-main.o all_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\ $(dir $(dep))/$(DEPDIR)/$(notdir $(dep))) -# Ensure that generated files are created early. Use order-only -# dependencies if available. They require GNU make 3.80 or newer, -# and the .VARIABLES variable was introduced at the same time. -ifdef .VARIABLES +# Ensure that generated files are created early. $(all_object_files): | $(generated_files) -else -$(all_object_files) : $(generated_files) -endif # Dependencies. -include $(all_deps_files) diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in index 3a3c8e62d14f..7c6ab64196e2 100644 --- a/gdbserver/Makefile.in +++ b/gdbserver/Makefile.in @@ -602,14 +602,8 @@ gdbreplay.o: gdbreplay.cc # dependency tracking. all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS) -# Ensure that generated files are created early. Use order-only -# dependencies if available. They require GNU make 3.80 or newer, -# and the .VARIABLES variable was introduced at the same time. -ifdef .VARIABLES +# Ensure that generated files are created early. $(all_object_files): | $(generated_files) -else -$(all_object_files) : $(generated_files) -endif # All the .deps files to include. all_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\ -- 2.55.0