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

[cross-compile] Improve fetching external projects and building speed, and fix compiling with more recent version of GCC #355

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bvlgah
Copy link

@bvlgah bvlgah commented Mar 4, 2024

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:

  1. Fetch external projects (to be specific, gcc and binutils) from ftpmirror.gnu.org rather than www.minix3.org for speed-up (10 MB/s vs ~50 KB/s).

  2. 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.

  3. 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:

cd external/gpl3/gcc
mkdir dist.orig
tar -C dist.orig --strip-components=1 gcc-4.8.5.tar.bz2
diff --color -u dist.orig/gcc/reload1.c dist/gcc/reload1.c > patches/0005-fix-gcc-reloads.patch
git add -f patches/0005-fix-gcc-reloads.patch

By the way, patches will be applied by fetch.sh.

petershh and others added 2 commits July 18, 2021 21:49
Current master cannot be cross-compiled due to gcc breaking changes.
This patchset is a workaround for this problem until source tree is
synchronized with current NetBSD.
There is a binutils patch which I cannot add to pull request, so I link
it here: https://gist.github.com/Santurysim/1973b8f723fb36242c9558a23408d469
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.

3 participants