Skip to content

[release/1.6] Make building static binaries simpler - #7045

Merged
kzys merged 1 commit into
containerd:release/1.6from
kzys:backport/1.6/7022
Jun 10, 2022
Merged

[release/1.6] Make building static binaries simpler#7045
kzys merged 1 commit into
containerd:release/1.6from
kzys:backport/1.6/7022

Conversation

@kzys

@kzyskzys commented Jun 10, 2022

Copy link
Copy Markdown
Member

This commit adds STATIC makefile variable to adjust LDFLAGS and build
tags accordingly.

Fixes#5824.

Signed-off-by: Kazuyoshi Kato katokazu@amazon.com
(cherry picked from commit 00eb74a)
Signed-off-by: Kazuyoshi Kato katokazu@amazon.com

This commit adds STATIC makefile variable to adjust LDFLAGS and build
tags accordingly.
Fixescontainerd#5824.
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
(cherry picked from commit 00eb74a)
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
@k8s-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kzys
kzys marked this pull request as ready for review June 10, 2022 17:18
Comment threadMakefile.linux
ifneq ($(GOARCH),$(filter $(GOARCH),mips mipsle mips64 mips64le ppc64))
GO_GCFLAGS += -buildmode=pie
ifeq ($(STATIC),)
GO_GCFLAGS += -buildmode=pie

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it changing the original behavior?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. By default (without STATIC=1), containerd is building position-independent, dynamically-liked binaries.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@kzys@k8s-ci-robot@dmcgowan@fuweid