From patchwork Tue Jul 12 12:25:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 1655385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=h9nwQlir; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj0S50fgsz9sB4 for ; Tue, 12 Jul 2022 22:29:25 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F03B839C2753 for ; Tue, 12 Jul 2022 12:29:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F03B839C2753 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1657628963; bh=SEHBYw1hup7IeSq9kj1ArtFQFB6Nq8W6/4ZDqdZr7Es=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=h9nwQlir3bDJz4S7Tr8tvQd9vEaORKdiuTZ+D+QcVHeEewC6Lh5/T7P4jC8mwqQAL Ra8dRjXpHOf0Ujc9fT7hvyWHtNjfrlJtgy5Wc/jnaPIGImLcG5FoLPtL1A2dXdfrUU Dzr5YEcKpxCaR1VXlZ07gd+Wmg5DMs2Ov+cbs2Ig= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 162823836F90 for ; Tue, 12 Jul 2022 12:25:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 162823836F90 Received: by mail-ej1-x630.google.com with SMTP id dn9so13981773ejc.7 for ; Tue, 12 Jul 2022 05:25:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=SEHBYw1hup7IeSq9kj1ArtFQFB6Nq8W6/4ZDqdZr7Es=; b=G0P8PjDlpzd5VsZK8/UzgKByxqT7RNnMBzOAjnbZATXOGSDkOMlDDbdcr0rDj7RF0T lTiTmnfzpMdEgMgFtM5DEw3XlKirhU3srDNk2vRYnSFOIqW07h3qKLmovzYgfO5NaIYy HtXdnURpZKQiSRSghPSO/qU6Q7vWYpSXIyhJ0xzP6p6svPF2B/4+jT+hXrwPxLpA9tgu OF8hjo/JFZK8IiQktL/mB3Ihg4NEMG1WiTj/Z7umQxlPC+3ZUzjTI71C8VvbkvfwJJeQ 5aKQPZrvVIKFqE1iTb/yTPDZGrm40gJ6Ze+iFQdED92xgsHx9Y0lr3lp9eRSVU56YO1F Uvig== X-Gm-Message-State: AJIora+0LSfHll0hcQ7Q5aH/I2Zfyjy1XHpUNNn7uYkJhEF2VSeej9Jp Dz5Ah9TFUwuEQ06psB9cTvUQMcpqILUoWA== X-Google-Smtp-Source: AGRyM1tdsTBmpD+JJ5jKpaL0wViTO3YrtyUjPtKnbRTY5LwLV01MXua9VxaF+B5CUE5SBb4tT8so2g== X-Received: by 2002:a17:906:7482:b0:722:ea8f:3a12 with SMTP id e2-20020a170906748200b00722ea8f3a12mr24294278ejl.220.1657628731926; Tue, 12 Jul 2022 05:25:31 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id f1-20020a1709064dc100b006fe9ec4ba9esm3786615ejw.52.2022.07.12.05.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:25:31 -0700 (PDT) Date: Tue, 12 Jul 2022 12:25:30 +0000 To: gcc-patches@gcc.gnu.org Subject: [Ada] Make it clear that gnatmake passes the ball to gprbuild if -P is set Message-ID: <20220712122530.GA3404897@adacore.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-13.2 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: Pierre-Marie de Rodat via Gcc-patches From: Pierre-Marie de Rodat Reply-To: Pierre-Marie de Rodat Cc: Vasiliy Fofanov Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Also move -P switch description to the top of the switches list. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * makeusg.adb, doc/gnat_ugn/building_executable_programs_with_gnat.rst: Move -P to the top of switches list and make it clear that gnatmake passes the ball to gprbuild if -P is set. * gnat_ugn.texi: Regenerate. diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst --- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst +++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst @@ -139,6 +139,17 @@ You may specify any of the following switches to ``gnatmake``: all other options. +.. index:: -P (gnatmake) + +:switch:`-P{project}` + Build GNAT project file ``project`` using GPRbuild. When this switch is + present, all other command-line switches are treated as GPRbuild switches + and not ``gnatmake`` switches. + +.. -- Comment: + :ref:`gnatmake_and_Project_Files`. + + .. index:: --GCC=compiler_name (gnatmake) :switch:`--GCC={compiler_name}` @@ -522,15 +533,6 @@ You may specify any of the following switches to ``gnatmake``: :switch:`-p` Same as :switch:`--create-missing-dirs` -.. index:: -P (gnatmake) - -:switch:`-P{project}` - Use project file ``project``. Only one such switch can be used. - -.. -- Comment: - :ref:`gnatmake_and_Project_Files`. - - .. index:: -q (gnatmake) :switch:`-q` diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -21,7 +21,7 @@ @copying @quotation -GNAT User's Guide for Native Platforms , Jun 24, 2022 +GNAT User's Guide for Native Platforms , Jul 11, 2022 AdaCore @@ -7120,6 +7120,21 @@ If @code{--version} was not used, display usage, then exit disregarding all other options. @end table +@geindex -P (gnatmake) + + +@table @asis + +@item @code{-P@emph{project}} + +Build GNAT project file @code{project} using GPRbuild. When this switch is +present, all other command-line switches are treated as GPRbuild switches +and not @code{gnatmake} switches. +@end table + +@c -- Comment: +@c :ref:`gnatmake_and_Project_Files`. + @geindex --GCC=compiler_name (gnatmake) @@ -7620,19 +7635,6 @@ This switch cannot be used when invoking @code{gnatmake} with several Same as @code{--create-missing-dirs} @end table -@geindex -P (gnatmake) - - -@table @asis - -@item @code{-P@emph{project}} - -Use project file @code{project}. Only one such switch can be used. -@end table - -@c -- Comment: -@c :ref:`gnatmake_and_Project_Files`. - @geindex -q (gnatmake) diff --git a/gcc/ada/makeusg.adb b/gcc/ada/makeusg.adb --- a/gcc/ada/makeusg.adb +++ b/gcc/ada/makeusg.adb @@ -54,6 +54,13 @@ begin Display_Usage_Version_And_Help; + -- Line for -P + + Write_Str (" -Pproj Build GNAT Project File proj using GPRbuild"); + Write_Eol; + Write_Str (" Treats all other switches as GPRbuild switches"); + Write_Eol; + -- Line for -a Write_Str (" -a Consider all files, even readonly ali files"); @@ -169,11 +176,6 @@ begin Write_Str (" -p Create missing obj, lib and exec dirs"); Write_Eol; - -- Line for -P - - Write_Str (" -Pproj Use GNAT Project File proj"); - Write_Eol; - -- Line for -q Write_Str (" -q Be quiet/terse");