Re: [PATCH] Only add -fno-var-tracking-assignments workaround for old GCC versions.

From: Mark Wielaard
Date: Mon Oct 12 2020 - 15:12:51 EST


Hi,

On Mon, 2020-10-12 at 11:59 -0700, Nick Desaulniers wrote:
> On Sat, Oct 10, 2020 at 3:57 PM Ian Rogers <irogers@xxxxxxxxxx>
> wrote:
> > On Sat, Oct 10, 2020 at 3:08 PM Mark Wielaard <mark@xxxxxxxxx>
> > wrote:
> > > -DEBUG_CFLAGS := $(call cc-option, -fno-var-tracking-
> > > assignments)
> > > +# Workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801
> > > +# for old versions of GCC.
> > > +DEBUG_CFLAGS := $(call cc-ifversion, -lt, 0500, $(call cc-
> > > option, -fno-var-tracking-assignments))
>
> Should this be wrapped in: `ifdef CONFIG_CC_IS_GCC`/`endif`?

I don't think so. It wasn't before. And call cc-option makes sure to
only add the flag if the compiler supports it (clang doesn't and it
also has a much higher version).

Cheers,

Mark