On Mon, Oct 2, 2023 at 2:06 PM Sergei Trofimovich <sly...@gmail.com> wrote:
>
> From: Sergei Trofimovich <siarh...@google.com>
>
> Without the change profiled bootstrap fails for various warnings on
> master branch as:
>
>     $ ../gcc/configure
>     $ make profiledbootstrap
>     ...
>     gcc/genmodes.cc: In function ‘int main(int, char**)’:
>     gcc/genmodes.cc:2152:1: error: ‘gcc/build/genmodes.gcda’ profile count 
> data file not found [-Werror=missing-profile]
>     ...
>     gcc/gengtype-parse.cc: In function ‘void parse_error(const char*, ...)’:
>     gcc/gengtype-parse.cc:142:21: error: ‘%s’ directive argument is null 
> [-Werror=format-overflow=]
>
> The change removes -Werror just like autofeedback does today.

I think that makes sense, OK if nobody objects.

Richard.

> /
>
>         PR bootstrap/111663
>         * Makefile.tpl (STAGEfeedback_CONFIGURE_FLAGS): Disable -Werror.
>         * Makefile.in: Regenerate.
> ---
>  Makefile.in  | 4 ++++
>  Makefile.tpl | 4 ++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/Makefile.in b/Makefile.in
> index 2f136839c35..e0e3c4c8fe8 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -638,6 +638,10 @@ STAGEtrain_TFLAGS = $(filter-out 
> -fchecking=1,$(STAGE3_TFLAGS))
>
>  STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use 
> -fprofile-reproducible=parallel-runs
>  STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS)
> +# Disable warnings as errors for a few reasons:
> +# - sources for gen* binaries do not have .gcda files available
> +# - inlining decisions generate extra warnings
> +STAGEfeedback_CONFIGURE_FLAGS = $(filter-out 
> --enable-werror-always,$(STAGE_CONFIGURE_FLAGS))
>
>  STAGEautoprofile_CFLAGS = $(filter-out -gtoggle,$(STAGE2_CFLAGS)) -g
>  STAGEautoprofile_TFLAGS = $(STAGE2_TFLAGS)
> diff --git a/Makefile.tpl b/Makefile.tpl
> index 5872dd03f2c..8b7783bb4f1 100644
> --- a/Makefile.tpl
> +++ b/Makefile.tpl
> @@ -561,6 +561,10 @@ STAGEtrain_TFLAGS = $(filter-out 
> -fchecking=1,$(STAGE3_TFLAGS))
>
>  STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use 
> -fprofile-reproducible=parallel-runs
>  STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS)
> +# Disable warnings as errors for a few reasons:
> +# - sources for gen* binaries do not have .gcda files available
> +# - inlining decisions generate extra warnings
> +STAGEfeedback_CONFIGURE_FLAGS = $(filter-out 
> --enable-werror-always,$(STAGE_CONFIGURE_FLAGS))
>
>  STAGEautoprofile_CFLAGS = $(filter-out -gtoggle,$(STAGE2_CFLAGS)) -g
>  STAGEautoprofile_TFLAGS = $(STAGE2_TFLAGS)
> --
> 2.42.0
>

Reply via email to