Makefile: Fix cross-compile in moby when using runc_nodmz #4345
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As suggested by moby/moby#48160 (comment) it was indeed the include of cc_platform.mk what is causing compilation issues. We were not disabling the include when compiling with runc_nodmz, IMHO we should avoid including it.
@cyphar can you take a look at the compilation issues in moby/moby#47666 and fix cc_platform.mk?
This seems to fix the compilation in moby (if we use runc_nodmz), although some tests fail. That still needs to be debugged too.
Compilation with this seems to work: https://github.com/moby/moby/actions/runs/9909151362
You can see the changes here: moby/moby#48161
One of the reasons to have a build tag to disable runc-dmz is to get rid of possible compile issues introduced by it (it needs to cross-compile a C program).
We were not being strict enough to include this file only when needed. This patch includes it only when not using runc_nodmz.
While we want to fix the compilation issues of runc-dmz in another commit, let's make when using runc_nodmz we don't include more than needed to compile.