aports/community/netdata/build-enable-cgo.patch
Kevin Daudt efe55d1aa6 community/netdata: upgrade to 1.45.3
- Switch build system to cmake
- Disable ebpf plugin (cannot be built at the moment)
- Include the go plugin (uses the original separate package name)
- Use upstream openrc init files

CVE-2024-32019 does not apply to us since we never upgraded to the
vulnerable versions.
2024-05-06 15:51:25 +00:00

16 lines
946 B
Diff

Description: enable CGO because buildmode=pie requries external linking
Upstream: no
diff --git a/packaging/cmake/Modules/NetdataGoTools.cmake b/packaging/cmake/Modules/NetdataGoTools.cmake
index 9bb09cd..90ee6b9 100644
--- a/packaging/cmake/Modules/NetdataGoTools.cmake
+++ b/packaging/cmake/Modules/NetdataGoTools.cmake
@@ -33,7 +33,7 @@ macro(add_go_target target output build_src build_dir)
add_custom_command(
OUTPUT ${output}
- COMMAND "${CMAKE_COMMAND}" -E env CGO_ENABLED=0 "${GO_EXECUTABLE}" build -buildvcs=false -ldflags "${GO_LDFLAGS}" -o "${CMAKE_BINARY_DIR}/${output}" "./${build_dir}"
+ COMMAND "${CMAKE_COMMAND}" -E env CGO_ENABLED=1 "${GO_EXECUTABLE}" build -buildvcs=false -ldflags "${GO_LDFLAGS}" -o "${CMAKE_BINARY_DIR}/${output}" "./${build_dir}"
DEPENDS ${${target}_DEPS}
COMMENT "Building Go component ${output}"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/${build_src}"