Re: Linux 6.1-rc3 build fail in include/linux/bpf.h

From: Jiri Olsa
Date: Mon Oct 31 2022 - 08:17:25 EST


On Mon, Oct 31, 2022 at 11:14:31AM +0000, David Laight wrote:
> The 6.1-rc3 sources fail to build because bpf.h unconditionally
> #define BPF_DISPATCHER_ATTRIBUTES __attribute__((patchable_function_entry(5)))
> for X86_64 builds.
>
> I'm pretty sure that should depend on some other options
> since the compiler isn't required to support it.
> (The gcc 7.5.0 on my Ubunti 18.04 system certainly doesn't)
>
> The only other reference to that attribute is in the definition
> of 'notrace' in compiler.h.

I guess we need to make some __has_attribute check and make all that conditional

cc-ing Peter

jirka

>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>