From patchwork Mon Aug 31 18:51:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 142549 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 30ADD4BA23ED for ; Mon, 31 Aug 2026 18:54:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 30ADD4BA23ED 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 10CF64BA23DE for ; Mon, 31 Aug 2026 18:53:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10CF64BA23DE 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 10CF64BA23DE 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=1788202391; cv=none; b=BGmR7S1OQ18W0p0u2y1ySnUael1wTPWpWtVwiFfjNAqi34lxtkcjX33UYvSjQrf0tcbVtXY1zhHHayk+Dr0hfhGhewT5GRJOBjMS/N+TkyeXh6g5zUtw7dQLuauh6WYZ++GA4sTcNE73e++trYdhnHeZdJ165mmVdzqUGP+bGDY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788202391; c=relaxed/simple; bh=pBWKAr11X8osJGqx6g3s+uW0geZUz4kz8u2dPAJ2xW4=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=EmZCFh0LvHiw70XerJR6q5D6IRJE5v9cUUJVZZrqgJn3bYuYEAWXpzOII7XdJaNng/XExJ52/h1fSzmbDD4oTBiI8tJPcSZ2PymTwQEvE/IzjcLgqEDDtbtWw7WTzHZyYHUuarmmGmIQvQojeDzuN92VuO3kYIhgNNvHYRBn648= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10CF64BA23DE Received: by simark.ca (Postfix) id CC2451E171; Mon, 31 Aug 2026 14:53:05 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 6/7] gdb: remove the explicit ada-exp.o rule Date: Mon, 31 Aug 2026 14:51:45 -0400 Message-ID: <20260831185300.572297-7-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 gdb/Makefile.in has an explicit rule to build ada-exp.o, along with an ADA_EXP_C variable used to spell out which ada-exp.c to compile: # ada-exp.c can appear in srcdir, for releases; or in ., for # development builds. ADA_EXP_C = `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi` ada-exp.o: ada-exp.c $(COMPILE) $(ADA_EXP_C) $(POSTCOMPILE) I don't think that's needed today. Both were added by commit 94e36acc3c80 (2013-07-10), the point was to compile ada-exp.c with -Wno-old-style-definition. Commit 8dc9fd87b096 ("Simplify ada-exp.o rule", 2018-09-01) dropped -Wold-style-definition, since it has no meaning in C++. That removed the reason for the rule to exist, but the rule was kept, on the grounds that "according to the comment, ada-exp.c may appear in the srcdir". But this is already by make: srcdir is in VPATH, so the pattern rule finds ada-exp.c in the build directory if it is there, and in srcdir otherwise. It works for all other *-exp.c files. Remove the rule and ADA_EXP_C, and let the generic pattern rule handle ada-exp.o. Remove the comment introducing the section as well, as this was the last rule in it. Tested in a development build only, we'll need to test this when building from a tarball, but that will be done at release time. Change-Id: Icec556845abe405cd51c8ba2999d7af9ee64db20 --- gdb/Makefile.in | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 74361808bf5a..cf10bc17320b 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2609,17 +2609,6 @@ force_update: # will remove them. MAKEOVERRIDES = -# Some files need explicit build rules (due to -Werror problems) or due -# to sub-directory fun 'n' games. - -# ada-exp.c can appear in srcdir, for releases; or in ., for -# development builds. -ADA_EXP_C = `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi` - -ada-exp.o: ada-exp.c - $(COMPILE) $(ADA_EXP_C) - $(POSTCOMPILE) - # Message files. Based on code in gcc/Makefile.in. # Rules for generating translated message descriptions. Disabled by