Fedora Account System
Red Hat Associate
Red Hat Customer
The gcc bpf port in gcc 14 is in good shape and usable. It can build the bpf self tests and pass a large number of these tests. The project wiki page is here: https://gcc.gnu.org/wiki/BPFBackEnd The cross-gcc bpf target (and cross-binutils bpf target) has been added to debian and also gentoo. Would it be possible to add it to Fedora? No additional gcc patches should be needed, aside from the specfile changes. Note that this needs cross-binutils 2.42 (I believe, David F. and Jose can correct me) (Will submit a bugzilla for that too). Reproducible: Always Something like this patch might be enough (note, untested!): --- cross-gcc.spec 2024-05-17 14:31:47.699326051 -0600 +++ /home/ezannoni/cross-gcc-orcl/cross-gcc/cross-gcc.spec 2024-05-17 14:16:33.846425873 -0600 @@ -11,6 +11,7 @@ %global build_arc %{build_all} %global build_avr32 %{build_all} %global build_blackfin %{build_all} +%global build_bpf %{build_all} %global build_c6x %{build_all} %global build_cris %{build_all} %global build_frv %{build_all} @@ -225,6 +233,7 @@ %do_package arm-linux-gnu %{build_arm} %do_package avr32-linux-gnu %{build_avr32} %do_package bfin-linux-gnu %{build_blackfin} +%do_package bpf-unknown-none %{build_bpf} %do_package c6x-linux-gnu %{build_c6x} %do_package cris-linux-gnu %{build_cris} %do_package frv-linux-gnu %{build_frv} @@ -318,6 +333,7 @@ prep_target arm-linux-gnu %{build_arm} prep_target avr32-linux-gnu %{build_avr32} prep_target bfin-linux-gnu %{build_blackfin} + prep_target bpf-unknown-none %{build_bpf} prep_target c6x-linux-gnu %{build_c6x} prep_target cris-linux-gnu %{build_cris} prep_target frv-linux-gnu %{build_frv} @@ -739,7 +820,13 @@ echo '%{_bindir}/'$arch'*-gcc-ar' echo '%{_bindir}/'$arch'*-gcc-nm' echo '%{_bindir}/'$arch'*-gcc-ranlib' - echo '%{_bindir}/'$arch'*-gcov*' + case $cpu in + bpf*) + ;; + *) + echo '%{_bindir}/'$arch'*-gcov*' + ;; + esac echo '%{_bindir}/'$arch'*-lto-dump' echo '%{_mandir}/man1/'$arch'*-cpp*' echo '%{_mandir}/man1/'$arch'*-gcc*' @@ -814,6 +901,7 @@ %do_files arm-linux-gnu %{build_arm} %do_files avr32-linux-gnu %{build_avr32} %do_files bfin-linux-gnu %{build_blackfin} +%do_files bpf-unknown-none %{build_bpf} %do_files c6x-linux-gnu %{build_c6x} %do_files cris-linux-gnu %{build_cris} %do_files frv-linux-gnu %{build_frv}
I'm not 100% sure but theoretically it should be possible to embed bpf code compile into regular gcc package.
I was wondering where this request is at.. and if there is anything that can be done to help. Having this cross and the companion cross for binutils-bpf would allow to switch back to gcc to build systemd, for instance.
Providing a tested patch would definitely help. Ideally via a PR at https://src.fedoraproject.org/rpms/cross-gcc.
FEDORA-2024-7083508bc0 (cross-gcc-14.1.1-2.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2024-7083508bc0
FEDORA-2024-7083508bc0 (cross-gcc-14.1.1-2.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report.
I can't edit the field, but fwiw, this was depending on bug 2281056 (now fixed, of course). It should now be possible to build systemd's bpf support with gcc, not clang, too.