| 1 | Description: enable CGO because buildmode=pie requries external linking
|
| 2 | Upstream: no
|
| 3 | diff --git a/packaging/cmake/Modules/NetdataGoTools.cmake b/packaging/cmake/Modules/NetdataGoTools.cmake
|
| 4 | index c8b8b9c..9396f81 100644
|
| 5 | |
| 6 | |
| 7 | @@ -33,7 +33,7 @@ macro(add_go_target target output build_src build_dir)
|
| 8 |
|
| 9 | add_custom_command(
|
| 10 | OUTPUT ${output}
|
| 11 | - COMMAND "${CMAKE_COMMAND}" -E env GOROOT=${GO_ROOT} CGO_ENABLED=0 GOPROXY=https://proxy.golang.org,direct "${GO_EXECUTABLE}" build -buildvcs=false -ldflags "${GO_LDFLAGS}" -o "${CMAKE_BINARY_DIR}/${output}" "./${build_dir}"
|
| 12 | + COMMAND "${CMAKE_COMMAND}" -E env GOROOT=${GO_ROOT} CGO_ENABLED=1 GOPROXY=https://proxy.golang.org,direct "${GO_EXECUTABLE}" build -buildvcs=false -ldflags "${GO_LDFLAGS}" -o "${CMAKE_BINARY_DIR}/${output}" "./${build_dir}"
|
| 13 | DEPENDS ${${target}_DEPS}
|
| 14 | COMMENT "Building Go component ${output}"
|
| 15 | WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/${build_src}"
|