How to organize bootstrapping phase of cross-compiler?
Mojca Miklavec
mojca at macports.org
Tue Nov 7 22:35:39 UTC 2017
Hi,
A while ago I packaged MinGW's gcc and left out one optional step, but
I need that one now.
The procedure is as follows:
(a) install a bunch of dependencies
(b) compile gcc to phase 1 (I currently call that port
i686-w64-mingw32-gcc-bootstrap)
(c) install some more files (i686-w64-mingw32-crt)
At that point I need gcc, but either phase 1, 2 or a fully fledged
compiler would do
I now use:
depends_build-append bin:${mingw_target}-gcc:${mingw_target}-gcc-bootstrap
(d) compile gcc to phase 2 (I currently call that port i686-w64-mingw32-gcc)
=> new optional steps
(e) install winpthreads library
At that point I need gcc, but either phase 2 or full compiler would do
(f) compile gcc again: now we have a complete installation
What would be suitable names for intermediate phases and how could I
write the dependency for winpthreads in a proper way?
Thank you,
Mojca
https://github.com/macports/macports-ports/blob/master/cross/i686-w64-mingw32-gcc/Portfile
https://github.com/macports/macports-ports/blob/master/cross/mingw-w64/Portfile
More information about the macports-dev
mailing list