libbpf / libbpf-bootstrap

Scaffolding for BPF application development with libbpf and BPF CO-RE
BSD 3-Clause "New" or "Revised" License
1.1k stars 299 forks source link

static build in example CMakelist #306

Open chentao-kernel opened 4 days ago

chentao-kernel commented 4 days ago

Hi, anakryiko, can we support static build in example CMakelist, i think others will also meet this glibc version problem image

set(CMAKE_EXE_LINKER_FLAGS "-static")

it seems add static flag can fix it, so is it meaningful?

anakryiko commented 3 days ago

If someone implements and tests this, then sure, I don't see why not. Ideally we also have CI test for this mode.

chentao-kernel commented 2 days ago

If someone implements and tests this, then sure, I don't see why not. Ideally we also have CI test for this mode.

ok, i will do it.