https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121149
Bug ID: 121149
Summary: build broken for bpf in libgcc
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: hp at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-linux
Target: bpf
A build of r16-2178-ge7f049471c6c configured for "--target=bpf
--enable-languages=c" (with ToT binutils d3d1718602b1 built for --target bpf in
$PATH), fails building libgcc thus:
/home/hp/tmp/bpf250710-00/o/./gcc/xgcc -B/home/hp/tmp/bpf250710-00/o/./gcc/
-B/usr/local/bpf/bin/ -B/usr/local/bpf/lib/ -isystem /usr/local/bpf/include
-isystem /usr/local/bpf/sys-include -g -O2 -O2 -g -O2 -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-error=narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
-Dinhibit_libc -I. -I. -I../.././gcc -I/home/hp/tmp/bpf250710-00/gcc/libgcc
-I/home/hp/tmp/bpf250710-00/gcc/libgcc/.
-I/home/hp/tmp/bpf250710-00/gcc/libgcc/../gcc
-I/home/hp/tmp/bpf250710-00/gcc/libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS
-o _gcov_info_to_gcda.o -MT _gcov_info_to_gcda.o -MD -MP -MF
_gcov_info_to_gcda.dep -DL_gcov_info_to_gcda -c
/home/hp/tmp/bpf250710-00/gcc/libgcc/libgcov-driver.c
/home/hp/tmp/bpf250710-00/gcc/libgcc/libgcov-driver.c: In function
'write_topn_counters':
/home/hp/tmp/bpf250710-00/gcc/libgcc/libgcov-driver.c:436:1: error: too many
function arguments for eBPF
436 | write_topn_counters (const struct gcov_ctr_info *ci_ptr,
| ^~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:942: _gcov_info_to_gcda.o] Error 1
make[2]: Leaving directory '/home/hp/tmp/bpf250710-00/o/bpf/libgcc'
Looks very much bpf-specific so I guess some ifdeffery or other target-thingy
is needed to exclude or limit libgcov-driver.c. But, when fixing that, I
suggest making that generic (not bpf-specific) for targets where gcov can never
be applied.
(But is BPF really such a target?)