From patchwork Tue May 16 08:39:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 94517 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp270182vqo; Tue, 16 May 2023 01:41:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5DlV31gR0B2MGtuh/q/u5K8zMkDNcInO5pj/HpoSc9KGjAiXZgecwEtyclyyKK5/KWW2O5 X-Received: by 2002:a05:6402:213:b0:50b:c380:a929 with SMTP id t19-20020a056402021300b0050bc380a929mr29807527edv.10.1684226502378; Tue, 16 May 2023 01:41:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684226502; cv=none; d=google.com; s=arc-20160816; b=PmMotnP3E4xkkyq/e1nYxPF4M6b6x4bSOOHOhd9IPwbO6F1TbfnFWj1drKwWa7/1BS wlsdYEiRA2aJ5dvwrU1E1MnskrMTq6tjdD5Fxplp4uzSZ1TFqKyakB9pQGGQYYnT5XWA s8yt675IFTjY9CwmjoMzwo44rugqiXaRjevhXmtW0qmniGpRgUPDvTSyHpXC3dlIfrmc OsIkWKIzvjNSjQfWt2uSOHOPyg2+MlN9SWvYXpl1WEMOW01aVI5rOC3Ch9POt5BwgLsh a9RHSEoMlf+1cX1su0KxiI7/XbpTasxtRIvYiy25BWuLjF/zEw2d6jNrTQ+KtIBTRcvD JBWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=itIKypQlArqTVW+d5h2/sisJ72lke49HP3F/j9srvCs=; b=ffuxwbOOFF4ImrIsjPphn0NJezsau60qPVSaHvdk+uZmKjXH5fJ4g3do+Pg5Vs++ys xkxe4wWU+pFL5NpAy5jHbyOE8Tqe7Mi8OwgZzq3g4iEFAFmhY4dySqdWQiqGF0Q9ORe3 U0F5ppLLbcuvgeGtcZIz5mx2l1Ti03wA9lByziMjHgvnVe5Lg71zN2i915LD1UGzS3E3 WQQ2WWWeQvS4tUiuJvMnXi16M/5mVQpLdEhS/NW3rXWrgYbm7QF/NMJI1SPNjBPRFvfB ETd8YZGSokjV2mPp9ZF63DXJwcv4zz9X3sjDiUgCFdaXI68tNLRbrd9iafbK6H5lCxfG 4zhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=XcNWjKwI; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id c9-20020aa7df09000000b0050c11023696si12872928edy.130.2023.05.16.01.41.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 01:41:42 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=XcNWjKwI; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8E3AF38708D5 for ; Tue, 16 May 2023 08:40:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E3AF38708D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684226432; bh=itIKypQlArqTVW+d5h2/sisJ72lke49HP3F/j9srvCs=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=XcNWjKwI+xp3+D/rjNkiI9hcu9UJ1uCWXKlLNKm/mgXdXn76PP6qBndYSDJe63H/6 z49Xx20hDpg1yRwfzZwIIeiU+kBXwqP/m0n9VwbHIIZqf6Xi8HpuWdsb9WSJ0rkCtT 2m6Ne7kINLHgs/nktuLXQHjIp/QmLv44+H8DkFYU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 5A3A6385735C for ; Tue, 16 May 2023 08:39:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A3A6385735C Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-30789a4c537so7498104f8f.0 for ; Tue, 16 May 2023 01:39:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684226378; x=1686818378; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=itIKypQlArqTVW+d5h2/sisJ72lke49HP3F/j9srvCs=; b=F6MmDL53x01MtDPCaX9+bXoevXnkoGaIEAAeSb0iRrJj6qq/O9ITnIX3fiHbzJBigZ FQgoWxJqXqGmKrRxw12xuluk/DumOKCuEELUDC8ROiarXNkoL8/RjO3zfD3yMgUelOxr iSeoFHcsr/mmjm097kfK+a69qwmggVHhYHsGJnDmwBtE+FGI6C5R9oxrVqMIzsns2726 UNt9GwmIfOXyvZMC7R8v91vyeg7wFLYXOUWPRwE/B2sIt9s4VqSv13TOpAmdpt+i2sHB HFvyOWyP6jep4j+oE8hbaL7E/PBgpPsdwW5m412yEblEumfhGxumQA7Iippx6DEJDcQl PzIw== X-Gm-Message-State: AC+VfDysow1KS5Gbm5pPDnauJY3M+WYnUEFuw7dzlvZxGEqkjun7vpt/ BdMuII1qZA232YCbsZW4zwkpzr0LRGFyXo1Z4cY8bg== X-Received: by 2002:adf:f7d1:0:b0:305:f2d5:34a6 with SMTP id a17-20020adff7d1000000b00305f2d534a6mr23235102wrq.16.1684226378112; Tue, 16 May 2023 01:39:38 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id r18-20020a056000015200b00300aee6c9cesm1781445wrx.20.2023.05.16.01.39.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 01:39:37 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Arnaud Charlet Subject: [COMMITTED] ada: Missing dependency with -gnatc Date: Tue, 16 May 2023 10:39:35 +0200 Message-Id: <20230516083935.1500895-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766039489087558293?= X-GMAIL-MSGID: =?utf-8?q?1766039489087558293?= From: Arnaud Charlet When using -gnatc, dependencies on preprocessor and config files were not recorded. gcc/ada/ * gnat1drv.adb: Ensure all dependencies are recorded even when not generating code. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gnat1drv.adb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 238618468e1..e74036e506a 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -1396,6 +1396,17 @@ begin Back_End_Mode := Skip; end if; + -- Ensure that we properly register a dependency on system.ads, since + -- even if we do not semantically depend on this, Targparm has read + -- system parameters from the system.ads file. + + Lib.Writ.Ensure_System_Dependency; + + -- Add dependencies, if any, on preprocessing data file and on + -- preprocessing definition file(s). + + Prepcomp.Add_Dependencies; + -- At this stage Back_End_Mode is set to indicate if the backend should -- be called to generate code. If it is Skip, then code generation has -- been turned off, even though code was requested by the original @@ -1542,17 +1553,6 @@ begin return; end if; - -- Ensure that we properly register a dependency on system.ads, since - -- even if we do not semantically depend on this, Targparm has read - -- system parameters from the system.ads file. - - Lib.Writ.Ensure_System_Dependency; - - -- Add dependencies, if any, on preprocessing data file and on - -- preprocessing definition file(s). - - Prepcomp.Add_Dependencies; - if GNATprove_Mode then -- In GNATprove mode we're writing the ALI much earlier than usual