Stichting-MINIX-Research-Foundation / minix

Official MINIX sources - Automatically replicated from gerrit.minix3.org
Other
2.99k stars 969 forks source link

Resolve GCC Cross-compilation Issues #316

Open stux2000 opened 3 years ago

stux2000 commented 3 years ago

I'm creating this issue to keep track of problems when cross-compiling Minix, particularly on Linux platforms

NOTE: Please do not comment on new issues here, instead please submit to a new issue and link to this one.

petershh commented 3 years ago

I'll try to describe current state of things here.

Currently, build is successful with GCC 8.

Firstly, there are links with breaking changes in GCC 9 and GCC 10:

It seems that Clang mimics GCC behavior, so information about these changes remains correct for Clang.

How these changes affect us:

  1. Nbmake fails to build because -fno-common flag is default now. This can be fixed rather easily. Also, we can take nbmake from NetBSD sources
  2. Cross tools from /external like binutils cannot be built. Currently, build process uses obsolete versions of these tools, so they should be upgaded. But this is a hard task because there is a lot of patches to make these tools work with NetBSD and MINIX. I don't think it is possible to upgrade these patches without experienced MINIX developer.