Skip to content

Commit

Permalink
Merge pull request #3680 from yeazelm/dynamic
Browse files Browse the repository at this point in the history
packages: update CGO_LDFLAGS for NVIDIA Go packages
  • Loading branch information
yeazelm authored Dec 21, 2023
2 parents a1d20d0 + ac12e49 commit 2d53ee8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ecs-gpu-init/ecs-gpu-init.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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 CGO_LDFLAGS="-Wl,-z,relro,-export-dynamic"
go build -buildmode=pie -ldflags="${GOLDFLAGS}" -o ecs-gpu-init ./cmd/ecs-gpu-init

%install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ BuildRequires: %{_cross_os}glibc-devel
%cross_go_configure %{goimport}
# 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 CGO_LDFLAGS="-Wl,-z,relro,-export-dynamic"
go build -ldflags="${GOLDFLAGS}" -o nvidia-device-plugin ./cmd/nvidia-device-plugin/

%install
Expand Down

0 comments on commit 2d53ee8

Please sign in to comment.