From AuroraUX
Introduction
This HowTo is about Building Ada GNAT Pro on Solaris SXCE snv_99+ x86/x64 & SPARC.
Check in the tool chain.
# hg clone http://hg.auroraux.blastwave.org/Misc/
Building GMP
# cd gmp-4.2.4/ ; ./configure --prefix=/opt/ada/gmp-4.2.4 ; gmake ; gmake check ; pfexec gmake install ; cd ../
Building MPFR
Here is the gouch ya !
# export CFLAGS="-m64"
# cd mpfr-2.3.2/ # ./configure --prefix=/opt/ada --with-gmp=/opt/ada/gmp-4.2.4 # gmake ; gmake check ; pfexec gmake install # cd ../ export CFLAGS=
Cross compiling GCC/GNAT to a SunOS host from a Linux host
- Start with a box that has a working gcc, that includes both c and ada ... a linux box will work fine, or one of the bsd family
- Get the source for gnat, which includes gcc because gnat is just a gcc frontend
- Configure your gnat/gcc build to create a *cross compiler*, setting the target to sunos
- Use the base box to build your cross-compiler, hosted on the base box and targeting SunOS
- Use the newly-built cross compiler (let's call it A) to build another gnat/gcc, this time hosted on sunos and targeting sunos (which we'll call B)
- Copy the sunos binary (B) from the base box to the sunos box, and copy the source over there too
- Use B to recompile itself on the sunos box, just to prove what a badass you are ... and to demonstrate that the compiler is actually working
In theory, you could use B to do your builds on sunos from then on out, but it's really best to use it to rebuild itself, as its first test. So in practice, you'll probably use C, which is what B produced on the sunos box by rebuilding itself (host sunos, target sunos), to do daily builds on sunos in the future.
Steps 3 and 4 are only necessary because cross compilers don't generally come prepackaged, so you need to build them from source
Building GCC & GNAT
See: http://hg.auroraux.blastwave.org/Misc/file/817312a17819/README For up to date info..
![[]](/skins/auroraux/open.png)