[cross-compile] Improve fetching external projects and building speed, and fix compiling with more recent version of GCC #355
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.
Acknowledgements
Thanks petershh for submitting a related PR #322 which fixes multiple strong symbol conflict during linking, I have also included the commit in this PR
Description
So far, I have made three changes:
Fetch external projects (to be specific,
gcc
andbinutils
) fromftpmirror.gnu.org
rather thanwww.minix3.org
for speed-up (10 MB/s vs ~50 KB/s).Use as much CPU cores as possible. At least for cross-compiling, the default number (it is 1) of core to use is specified in releasetools/image.defaults.
Fix building with more recent version of GCC (I am compiling Minix on an Ubuntu 22.04 container with GCC 11.4). These fixes are added in the form of
*.patch
files. Here is my way of generating them:By the way, patches will be applied by fetch.sh.