All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bpf: compile BPF library functions with -ffreestanding
@ 2025-07-31  3:09 Kris Van Hees
  2025-07-31  3:44 ` Eugene Loh
  2025-07-31  4:12 ` [DTrace-devel] " Sam James
  0 siblings, 2 replies; 3+ messages in thread
From: Kris Van Hees @ 2025-07-31  3:09 UTC (permalink / raw)
  To: dtrace, dtrace-devel

Per Jose, we should be compiling our BPF code with -ffreestanding to
ensure that BPF-specific standard header files are used instead of
host-specific ones.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
---
 GNUmakefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/GNUmakefile b/GNUmakefile
index b8e09f574..7ad857f88 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -127,7 +127,7 @@ PREPROCESS = $(CC) -E
 export BPFC ?= bpf-unknown-none-gcc
 
 BPFCPPFLAGS += -D$(subst sparc64,__sparc,$(subst aarch64,__aarch64__,$(subst x86_64,__amd64,$(ARCH))))
-BPFCFLAGS ?= -O2 -Wall -Wno-unknown-pragmas $(if $(HAVE_BPFV3),-mcpu=v3) $(if $(HAVE_BPFMASM),-masm=normal)
+BPFCFLAGS ?= -O2 -Wall -Wno-unknown-pragmas $(if $(HAVE_BPFV3),-mcpu=v3) $(if $(HAVE_BPFMASM),-masm=normal) -ffreestanding
 export BPFLD ?= bpf-unknown-none-ld
 
 all::
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-31  4:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31  3:09 [PATCH] bpf: compile BPF library functions with -ffreestanding Kris Van Hees
2025-07-31  3:44 ` Eugene Loh
2025-07-31  4:12 ` [DTrace-devel] " Sam James

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.