On Wed, Oct 2, 2024 at 10:43 PM Sam James <s...@gentoo.org> wrote:
>
> Valgrind doesn't error out by default which means bootstrap issues like
> in PR116945 can easily be missed: pass --exit-errorcode=1 to handle this.
>
> gcc/ChangeLog:
>         PR other/116945
>         PR other/116947
>
>         * gcc.cc (execute): Pass --error-exitcode=2 to Valgrind.

There's a discrepancy here with the values: it's 2 at this point in
the ChangeLog, but 1 in the actual code...

> ---
>  gcc/gcc.cc | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/gcc.cc b/gcc/gcc.cc
> index 16fed46fb35f..cb3c0be77d31 100644
> --- a/gcc/gcc.cc
> +++ b/gcc/gcc.cc
> @@ -3402,12 +3402,13 @@ execute (void)
>        for (argc = 0; commands[i].argv[argc] != NULL; argc++)
>         ;
>
> -      argv = XALLOCAVEC (const char *, argc + 3);
> +      argv = XALLOCAVEC (const char *, argc + 4);
>
>        argv[0] = VALGRIND_PATH;
>        argv[1] = "-q";
> -      for (j = 2; j < argc + 2; j++)
> -       argv[j] = commands[i].argv[j - 2];
> +      argv[2] = "--error-exitcode=1";
> +      for (j = 3; j < argc + 3; j++)
> +       argv[j] = commands[i].argv[j - 3];
>        argv[j] = NULL;
>
>        commands[i].argv = argv;
> --
> 2.46.2
>

Reply via email to