Skip to content

Commit

Permalink
Merge pull request #3920 from yeazelm/ecs-gpu-init-from-ben
Browse files Browse the repository at this point in the history
ecs-gpu-init: clean up linker flags
  • Loading branch information
yeazelm authored Apr 26, 2024
2 parents f8f6b23 + 35c2432 commit 5f1d42b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/ecs-gpu-init/ecs-gpu-init.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ cp -r %{_builddir}/sources/%{workspace_name}/* .
%set_cross_go_flags
# We don't set `-Wl,-z,now`, because the binary uses lazy loading
# to load the NVIDIA libraries in the host
export CGO_LDFLAGS="-Wl,-z,relro,-export-dynamic"
go build -buildmode=pie -ldflags="${GOLDFLAGS}" -o ecs-gpu-init ./cmd/ecs-gpu-init
export CGO_LDFLAGS="-Wl,-z,relro -Wl,--export-dynamic"
export GOLDFLAGS="-compressdwarf=false -linkmode=external -extldflags '${CGO_LDFLAGS}'"
go build -ldflags="${GOLDFLAGS}" -o ecs-gpu-init ./cmd/ecs-gpu-init

%install
install -d %{buildroot}%{_cross_bindir}
Expand Down

0 comments on commit 5f1d42b

Please sign in to comment.