From 995d1c2b7cca9bec23a60f9cbcebccd9f307c53f Mon Sep 17 00:00:00 2001 From: "Jose E. Marchesi" Date: Fri, 3 Jan 2025 13:42:26 +0100 Subject: bpf: install a wrapping stdint.h for bpf-none-unknown targets This patch makes GCC to wrap the host's stdint.h header when operating in the default hosted/non-freestanding mode. It is thus up to the user to provide a suitable standard header unless -ffreestanding gets explicitly passed in the compilation line. A few tests that use stdint.h are adapted to explicitly pass -ffreestanding. Tested in a x86_64-linux-gnu host with target bpf-unknown-none. gcc/ChangeLog: * config.gcc: install a wrapping stdint.h in bpf targets. gcc/testsuite/ChangeLog: * gcc.target/bpf/diag-funargs-2.c: Use -ffreestanding. * gcc.target/bpf/helper-skb-ancestor-cgroup-id.c: Likewise. * gcc.target/bpf/helper-bind.c: Likewise. * gcc.target/bpf/diag-funargs-3.c: Likewise. --- gcc/testsuite/gcc.target/bpf/helper-bind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/testsuite/gcc.target/bpf/helper-bind.c') diff --git a/gcc/testsuite/gcc.target/bpf/helper-bind.c b/gcc/testsuite/gcc.target/bpf/helper-bind.c index 53514ba..3b20edc 100644 --- a/gcc/testsuite/gcc.target/bpf/helper-bind.c +++ b/gcc/testsuite/gcc.target/bpf/helper-bind.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-std=gnu99" } */ +/* { dg-options "-std=gnu99 -ffreestanding" } */ #include -- cgit v1.1