Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libct/dmz: Support compiling on all arches #4076

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

rata
Copy link
Member

@rata rata commented Oct 18, 2023

This should make compilation work on all arches, doesn't matter if nolibc is supported there or not. If it is not supported, we just use the C stdlib.

Please review the NOLIBC_GOARCHES var, as that should have the GOARCH values that nolibc support. If we have a mistake there (i.e. put an arch that is not supported), compilation will fail on that arch.

I tried to be conservative on the arches to put there, but not just limit to the ones I can test (386 and amd64). Please review that part.

Fixes: #4037

cc @cyphar @AkihiroSuda

See below the commit msg.


When we added nolibc, we started using it unconditionally. But runc is currently being compiled on more arches than supported by nolibc, like MIPS.

Let's compile using stdlib if the arch we are compiling on is not supported by nolibc.

If compilation is broken in some arch, just removing it from the NOLIBC_GOARCHES variable should fix the compilation, as it will fallback to use the C stdlib.

@rata rata force-pushed the rata/smaller-runc-dmz branch 4 times, most recently from e9fe44b to 017339f Compare October 18, 2023 13:21
@kolyshkin kolyshkin added this to the 1.2.0 milestone Oct 18, 2023
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

Problem in Makefile.

libcontainer/dmz/Makefile Outdated Show resolved Hide resolved
When we added nolibc, we started using it unconditionally. But runc is
currently being compiled on more arches than supported by nolibc, like
MIPS.

Let's compile using stdlib if the arch we are compiling on is not
supported by nolibc.

If compilation is broken in some arch, just removing it from the
NOLIBC_GOARCHES variable should fix the compilation, as it will fallback
to use the C stdlib.

Signed-off-by: Rodrigo Campos <[email protected]>
@rata rata force-pushed the rata/smaller-runc-dmz branch from 017339f to b6a0c48 Compare October 19, 2023 09:12
@rata
Copy link
Member Author

rata commented Oct 19, 2023

@kolyshkin Thanks, great catch! Fixed, PTAL :)

@rata rata requested a review from kolyshkin October 19, 2023 09:30
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@kolyshkin kolyshkin merged commit 93d1617 into opencontainers:main Oct 20, 2023
45 checks passed
@rata rata deleted the rata/smaller-runc-dmz branch July 12, 2024 12:42
Sign up for free to 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.

Support compiling on MIPS
3 participants