From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75655 invoked by alias); 25 Feb 2020 08:21:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 75647 invoked by uid 89); 25 Feb 2020 08:21:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=all!, suits, H*M:45bc X-HELO: smtp.ispras.ru Received: from winnie.ispras.ru (HELO smtp.ispras.ru) (83.149.199.91) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Feb 2020 08:21:02 +0000 Received: from [10.10.3.54] (utre4ko.intra.ispras.ru [10.10.3.54]) by smtp.ispras.ru (Postfix) with ESMTP id B52BD201D0; Tue, 25 Feb 2020 11:20:58 +0300 (MSK) Subject: Re: [PATCH] issues with configure --enable-checking option To: Sandra Loosemore , "gcc-patches@gcc.gnu.org" , Richard Sandiford , Richard Biener , Jakub Jelinek Cc: Alexander Monakov References: <540c7900-96e4-d762-56be-6b453a0a38a7@ispras.ru> <2f34ffaf-5038-01bd-4881-262a964e1820@ispras.ru> <7b5774a8-60d0-c36e-efde-8ff88755f50e@codesourcery.com> From: Roman Zhuykov Message-ID: Date: Tue, 25 Feb 2020 08:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <7b5774a8-60d0-c36e-efde-8ff88755f50e@codesourcery.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg01363.txt.bz2 Hi all! 22.02.2020 6:25, Sandra Loosemore wrote: > On 2/11/20 7:46 AM, Roman Zhuykov wrote: >> Since I have to ask again about backports, I've decided to make few more >> steps and with Alexander's help created new patch which rewords the >> whole option description and covers items (3), (4) and (8).  CCing Jakub >> and Richard as release managers, also ask Sandra to take a quick look if >> new wording is alright.  New patch suits all active branches.  OK for >> 10-9-8 ? > > I'm not an expert on the content, but the new text reads OK except for > using future tense to describe current behavior.  Namely: > >> +requested complexity.  This will slow down the compiler and may only >> work > > s/will slow/slows/ > >> +must be explicitly requested.  Disabling assertions will make the >> compiler >> +and runtime slightly faster but increase the risk of undetected >> internal > > s/will make/makes/ > s/increase/increases/ > >> +option is specified the stage1 compiler will be built with @samp{yes} > > s/will be/is/ > > OK with those fixes applied. 07.02.2020 20:20, Richard Sandiford wrote: > OK with those changes, and thanks for doing this. Sandra and Richard, thank you for review! Since 'types' checks are included into 'yes' and I addressed all other hints, I have pushed updated patch as r10-6832. Jakub, Richard B, can I apply it to 8 and 9 ? Roman doc: properly describe --enable-checking behavior This patch rewords the whole description to fix minor issues:  - documents 'gimple' and 'types' checks,  - clarifies what happens when option is used without '=list',  - fixes inaccurate wrong wording about release snapshots,  - describes that release checks can only be disabled explicitly. gcc/ChangeLog: 2020-02-25  Roman Zhuykov      * doc/install.texi (--enable-checking): Properly document current     behavior.     (--enable-stage1-checking): Minor clarification about bootstrap. diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1839,41 +1839,48 @@ final releases.  The specific files which get @option{-Werror} are  controlled by the Makefiles.    @item --enable-checking +@itemx --disable-checking  @itemx --enable-checking=@var{list} -When you specify this option, the compiler is built to perform internal -consistency checks of the requested complexity.  This does not change the -generated code, but adds error checking within the compiler.  This will -slow down the compiler and may only work properly if you are building -the compiler with GCC@.  This is @samp{yes,extra} by default when building -from the source repository or snapshots, but @samp{release} for releases.  The default -for building the stage1 compiler is @samp{yes}.  More control -over the checks may be had by specifying @var{list}.  The categories of -checks available are @samp{yes} (most common checks -@samp{assert,misc,tree,gc,rtlflag,runtime}), @samp{no} (no checks at -all), @samp{all} (all but @samp{valgrind}), @samp{release} (cheapest -checks @samp{assert,runtime}) or @samp{none} (same as @samp{no}). -Individual checks can be enabled with these flags @samp{assert}, -@samp{df}, @samp{fold}, @samp{gc}, @samp{gcac}, @samp{misc}, @samp{rtl}, -@samp{rtlflag}, @samp{runtime}, @samp{tree}, @samp{extra} and @samp{valgrind}. -@samp{extra} adds for @samp{misc} checking extra checks that might affect -code generation and should therefore not differ between stage1 and later -stages. - -The @samp{valgrind} check requires the external @command{valgrind} -simulator, available from @uref{http://valgrind.org/}.  The -@samp{df}, @samp{rtl}, @samp{gcac} and @samp{valgrind} checks are very expensive. -To disable all checking, @samp{--disable-checking} or -@samp{--enable-checking=none} must be explicitly requested.  Disabling -assertions will make the compiler and runtime slightly faster but -increase the risk of undetected internal errors causing wrong code to be -generated. +This option controls performing internal consistency checks in the compiler. +It does not change the generated code, but adds error checking of the +requested complexity.  This slows down the compiler and may only work +properly if you are building the compiler with GCC@. + +When the option is not specified, the active set of checks depends on context. +Namely, bootstrap stage 1 defaults to @samp{--enable-checking=yes}, builds +from release archives default to @samp{--enable-checking=release}, and +otherwise @samp{--enable-checking=yes,extra} is used.  When the option is +specified without a @var{list}, the result is the same as +@samp{--enable-checking=yes}.  Likewise, @samp{--disable-checking} is +equivalent to @samp{--enable-checking=no}. + +The categories of checks available in @var{list} are @samp{yes} (most common +checks @samp{assert,misc,gc,gimple,rtlflag,runtime,tree,types}), @samp{no} +(no checks at all), @samp{all} (all but @samp{valgrind}), @samp{release} +(cheapest checks @samp{assert,runtime}) or @samp{none} (same as @samp{no}). +@samp{release} checks are always on and to disable them +@samp{--disable-checking} or @samp{--enable-checking=no[,]} +must be explicitly requested.  Disabling assertions makes the compiler and +runtime slightly faster but increases the risk of undetected internal errors +causing wrong code to be generated. + +Individual checks can be enabled with these flags: @samp{assert}, @samp{df}, +@samp{extra}, @samp{fold}, @samp{gc}, @samp{gcac}, @samp{gimple}, +@samp{misc}, @samp{rtl}, @samp{rtlflag}, @samp{runtime}, @samp{tree}, +@samp{types} and @samp{valgrind}.  @samp{extra} extends @samp{misc} +checking with extra checks that might affect code generation and should +therefore not differ between stage1 and later stages in bootstrap. + +The @samp{valgrind} check requires the external @command{valgrind} simulator, +available from @uref{http://valgrind.org/}.  The @samp{df}, @samp{rtl}, +@samp{gcac} and @samp{valgrind} checks are very expensive.    @item --disable-stage1-checking  @itemx --enable-stage1-checking  @itemx --enable-stage1-checking=@var{list} -If no @option{--enable-checking} option is specified the stage1 -compiler will be built with @samp{yes} checking enabled, otherwise -the stage1 checking flags are the same as specified by +This option affects only bootstrap build.  If no @option{--enable-checking} +option is specified the stage1 compiler is built with @samp{yes} checking +enabled, otherwise the stage1 checking flags are the same as specified by  @option{--enable-checking}.  To build the stage1 compiler with  different checking options use @option{--enable-stage1-checking}.  The list of checking options is the same as for @option{--enable-checking}.