# Re: \[PATCH 2/2\] Kconfig: CC\_HAS\_NO\_PROFILE\_FN\_ATTR, depend on for GCOV and PGO

- From: Mark Rutland \<mark.rutland@arm.com\>
- Date: 2021-06-22 09:29:50 
- List: linux-doc
- Page: https://ratatoskr.run/linux-doc/2021/06/1422221
- Thread: https://ratatoskr.run/linux-doc/2021/06/1419755/t.md

```text
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@google.com

:)

Thanks,
Mark.
```
