arm allmodconfig build issue with bpf
Russell King (Oracle)
linux at armlinux.org.uk
Wed Dec 4 08:06:25 PST 2024
On Wed, Dec 04, 2024 at 03:54:30PM +0000, John Garry wrote:
> Hi all,
>
> For some time, the arm allmodconfig build has had this following build issue
> for me:
>
> $ make net/bpf/test_run.o
> CALL scripts/checksyscalls.sh
> CC net/bpf/test_run.o
> net/bpf/test_run.c:522:1: error: ‘retain’ attribute ignored
> [-Werror=attributes]
> 522 | {
> | ^
> net/bpf/test_run.c:568:1: error: ‘retain’ attribute ignored
> [-Werror=attributes]
> 568 | {
> | ^
> net/bpf/test_run.c:577:1: error: ‘retain’ attribute ignored
> [-Werror=attributes]
> 577 | {
> | ^
> net/bpf/test_run.c:584:1: error: ‘retain’ attribute ignored
> [-Werror=attributes]
> 584 | {
> | ^
> net/bpf/test_run.c:590:1: error: ‘retain’ attribute ignored
> [-Werror=attributes]
> 590 | {
> | ^
> net/bpf/test_run.c:619:1: error: ‘retain’ attribute ignored
> [-Werror=attributes]
> 619 | {
> | ^
> net/bpf/test_run.c:624:1: error: ‘retain’ attribute ignored
> [-Werror=attributes]
> 624 | {
> | ^
> net/bpf/test_run.c:630:1: error: ‘retain’ attribute ignored
> [-Werror=attributes]
> 630 | {
> | ^
> net/bpf/test_run.c:634:1: error: ‘retain’ attribute ignored
> [-Werror=attributes]
> 634 | {
> | ^
> cc1: all warnings being treated as errors
> make[4]: *** [scripts/Makefile.build:194: net/bpf/test_run.o] Error 1
> make[3]: *** [scripts/Makefile.build:440: net/bpf] Error 2
> make[2]: *** [scripts/Makefile.build:440: net] Error 2
> make[1]: *** [/home/ubuntu/mnt/linux2/Makefile:1989: .] Error 2
> make: *** [Makefile:251: __sub-make] Error 2
> ubuntu at jgarry-ubuntu-bm5-instance-20230215-1843:~/mnt/linux2$
>
> The issue comes the definition of __bpf_kfunc from include/linux/btf.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99587
seems relevant. Jakub's reply in comment 3 suggests that:
#if __has_attribute(__retain__) && \
(defined(CONFIG_LD_DEAD_CODE_DATA_ELIMINATION) || \
defined(CONFIG_LTO_CLANG))
# define __retain __attribute__((__retain__))
#else
# define __retain
#endif
is wrong - __has_attribute(__retain__) doesn't mean that GCC supports
__retain__, it only means that it "knows" about it but may still
reject it.
The nice thing about this bug is... it's remained "NEW" for three
years already, so likely means that it remains unfixed.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
More information about the linux-arm-kernel
mailing list