Re: [PATCH] Makefile: Improve compressed debug info support detection

From: Nick Desaulniers
Date: Thu Jun 11 2020 - 16:45:08 EST


On Wed, Jun 10, 2020 at 4:39 PM Arvind Sankar <nivedita@xxxxxxxxxxxx> wrote:
>
> On Wed, Jun 10, 2020 at 07:30:46PM -0400, Arvind Sankar wrote:
> > On Wed, Jun 10, 2020 at 02:27:55PM -0700, Nick Desaulniers wrote:
> >
> > No, as-option does invoke the assembler. The problem here is that with
> > -Wa, the option is only seen by the assembler, not the gcc driver. So it
> > will succeed because the assembler supports it, but it will not test
> > whether the gcc driver also supports it.
> >
>
> I think in theory another way to fix it is to just use -Wa even for
> CFLAGS, assuming the compiler itself doesn't have to do anything with
> the option and it's purely an assembler thing. Then you'd just do the as
> and ld tests.

I don't think the CFLAGS are used for .S source files though. We may
drive assembler via the compiler, but AFLAGS are used in place of
CFLAGS IIRC. (eh, maybe not for ARCH=arc, ARCH=sh, ARCH=csky,
ARCH=mips)

--
Thanks,
~Nick Desaulniers