diff options
| author | Paul Buetow <paul@buetow.org> | 2024-02-04 10:45:19 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-02-04 10:45:19 +0200 |
| commit | 86df1706e25d945aad671d3bf9f89f1d057eb616 (patch) | |
| tree | b9a86cdb3133c83e7cccec76fbf133dc20b01c8f /build.sh | |
| parent | 6f0b9a473ab8e3fd8ac58724e907809da36b1bd1 (diff) | |
can compile
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..a6d5e27 --- /dev/null +++ b/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -xeuf -o pipefail + +clang -g -O2 -Wall -fpie -I../libbpfgo/selftest/common -target bpf -D__TARGET_ARCH_amd64 -I../libbpfgo/output -I../libbpfgo/selftest/common -c main.bpf.c -o main.bpf.o + +export CC=clang +export CGO_CFLAGS="-I/home/paul/git/libbpfgo/output -I/home/paul/git/libbpfgo/selftest/common" +export CGO_LDFLAGS="-lelf -lzstd /home/paul/git/libbpfgo/output/libbpf.a" +export GOOS=linux +export GOARCH=amd64 + +go build -tags netgo -ldflags '-w -extldflags "-static"' -o ioriotng ./main.go |
