From patchwork Mon Aug 31 18:51:43 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 142548 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC70C4BA7995 for ; Mon, 31 Aug 2026 18:54:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC70C4BA7995 X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org 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 X-Spam-Status: No, score=-1165.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, LOCAL_AUTHENTICATION_FAIL_DMARC, LOCAL_AUTHENTICATION_FAIL_SPF, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org 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~patchwork=sourceware.org@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)),\