Skip to content

Makefile: fix typo in LDFLAGS_STATIC#3746

Merged
AkihiroSuda merged 1 commit intoopencontainers:mainfrom
crazy-max:fix-static-pie
Feb 15, 2023
Merged

Makefile: fix typo in LDFLAGS_STATIC#3746
AkihiroSuda merged 1 commit intoopencontainers:mainfrom
crazy-max:fix-static-pie

Conversation

@crazy-max
Copy link
Contributor

clang is pretty strict while gcc ignores this error:

#34 0.279 go build -trimpath -buildmode=pie  -tags "seccomp urfave_cli_no_docs netgo osusergo" -ldflags "-X main.gitCommit=v1.1.0-402-gb199fb2e -X main.version=1.1.0+dev -linkmode external -extldflags --static-pie " -o runc .
#34 5.352 # github.com/opencontainers/runc
#34 5.352 /usr/local/go/pkg/tool/linux_amd64/link: running x86_64-linux-gnu-clang failed: exit status 1
#34 5.352 clang: error: unsupported option '--static-pie'; did you mean '-static-pie'?
#34 5.352
#34 5.384 make: *** [Makefile:69: static] Error 2

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@thaJeztah
Copy link
Member

Looks like this was added in 21e32d4 (part of #3446), which is currently only in the main branch.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@AkihiroSuda AkihiroSuda merged commit 4e3699c into opencontainers:main Feb 15, 2023
@crazy-max crazy-max deleted the fix-static-pie branch February 15, 2023 02:43
@ranjitsinhrathod1991
Copy link

Can this be also backported to release-1.1 branch as well? Thanks

@thaJeztah
Copy link
Member

thaJeztah commented Feb 5, 2025

Ah, derp, yes, looks like my comment didn't age well

Looks like this was added in 21e32d4 (part of #3446), which is currently only in the main branch.

I see the bug from #3446 was backported to the release-1.1 branch in 923ae4d;

So v1.1.8 and up regressed;

runc/Makefile

Line 40 in 0683379

LDFLAGS_STATIC := -linkmode external -extldflags --static-pie

(edit: linked wrong PR)

@thaJeztah thaJeztah added the backport/1.1-todo A PR in main branch which needs to be backported to release-1.1 label Feb 5, 2025
@kolyshkin
Copy link
Contributor

Can this be also backported to release-1.1 branch as well? Thanks

Problem is, we do not have plans for another 1.1.x release. Can you please tell us why runc 1.2.x is not working for you @ranjitsinhrathod1991?

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

Labels

backport/1.1-todo A PR in main branch which needs to be backported to release-1.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants