mirror of
https://github.com/h3xduck/TripleCross.git
synced 2026-01-18 05:13:11 +08:00
Setup development environment with libbpf
This commit is contained in:
14
external/libbpf-bootstrap/libbpf/travis-ci/managers/test_compile.sh
vendored
Executable file
14
external/libbpf-bootstrap/libbpf/travis-ci/managers/test_compile.sh
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -euox pipefail
|
||||
|
||||
CFLAGS=${CFLAGS:-}
|
||||
|
||||
cat << EOF > main.c
|
||||
#include <bpf/libbpf.h>
|
||||
int main() {
|
||||
return bpf_object__open(0) < 0;
|
||||
}
|
||||
EOF
|
||||
|
||||
# static linking
|
||||
${CC:-cc} ${CFLAGS} -o main -I./install/usr/include main.c ./build/libbpf.a -lelf -lz
|
||||
Reference in New Issue
Block a user