aports/community/bpftrace/10-link-libbpf.patch
2022-01-01 22:56:34 +00:00

13 lines
516 B
Diff

Explicitly link runtime against libbpf to fix "DSO missing from command line" error
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 47a050e2..37c90d54 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -162,6 +162,7 @@ if(STATIC_LINKING)
set_property(TARGET LIBELF PROPERTY IMPORTED_LOCATION ${LIBELF_LIBRARIES})
target_link_libraries(runtime LIBELF)
else()
+ target_link_libraries(runtime ${LIBBPF_LIBRARIES})
target_link_libraries(runtime ${LIBELF_LIBRARIES})
endif(STATIC_LINKING)