Re: [PATCH 2/2] Kconfig: CC_HAS_NO_PROFILE_FN_ATTR, depend on for GCOV and PGO

From: Mark Rutland
Date: Tue Jun 22 2021 - 05:29:50 EST


On Tue, Jun 22, 2021 at 10:25:34AM +0100, Catalin Marinas wrote:
> On Mon, Jun 21, 2021 at 01:43:54PM -0700, Nick Desaulniers wrote:
> > We need to be able to express via Kconfig "GCOV should not be enabled
> > for architectures that use noinstr when the toolchain does not support
> > __attribute__((no_profile_instrument_function))."
> >
> > Where "architectures that use noinstr" are currently arm64, s390, and
> > x86. So I guess we could do:
> >
> > + depends on !ARM64 || !S390 || !X86 || CC_HAS_NO_PROFILE_FN_ATTR
>
> I think you want:
>
> depends on !(ARM64 || S390 || X86) || CC_HAS_NO_PROFILE_FN_ATTR
>
> > (We could add a Kconfig for ARCH_WANTS_NO_INSTR, which might be more
> > informative than listed out architectures which might be non-obvious
> > to passers-by).
>
> That would probably look better.

It does; see:

https://lore.kernel.org/r/20210621231822.2848305-1-ndesaulniers@xxxxxxxxxx

:)

Thanks,
Mark.