-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't set cross-compilation variables in Makefile
This feature (cc_platform.mk and its sourcing from Makefiles) was added by commit dac4171 ("runc-dmz: reduce memfd binary cloning cost with small C binary") as part of dmz work. From what I see, this is not needed for `make releaseall` as we already set these variables using `set_cross_vars` shell function. My best guess is this was mostly needed for testing (and for cross-i386 CI job). The big issue though is these variables are guessed based on our cross-compilation environment, meaning they won't work in other cases (such as native compilation on non-x86_64 platforms, or using other cross-compilation tools). One such example is Moby build which uses https://github.com/tonistiigi/xx. Besides, it's a duplication of effort in scripts/lib.sh, which is prone to error. Let's remove this from the Makefiles, and rework the script which sets those variables so it can be used for other scenarios as well. For example, to test cross-compilation locally (assuming we're in the same environment as created by `make releaseall`), use $(./script/cross.sh $ARCH); make $TARGET Signed-off-by: Kir Kolyshkin <[email protected]>
- Loading branch information
Showing
8 changed files
with
15 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters