Cross compile and install SBCL on Sparc T2 server T5220
Recently I bought a Sparc t2 machine, with a single socket, 8 cores and 32 threads. I installed Gentoo Linux on it with kernel version 5.5.11. Since I usually use the Common Lisp language for programming, I looked at how to cross-compile SBCL to this platform.

1. Download the source code of SBCL
2. Find another x86 machine with SBCL installed on the intranet, turn on the NFS on two machines, and mount the source code directory on the Sparc machine to the x86 machine.
3. Set the compilation host architecture and cross-compiler on the x86 host:
host # export SBCL_ARCH=x86
host # export SBCL_XC_HOST=sbcl
4. Set the target architecture on the Sparc machine:
target # export SBCL_ARCH=sparc
5. Modify src/runtime/Config.sparc-linux

Change "-m32" to the corresponding architecture of the machine, and here is the GCC's options for the Sparc architecture: https://gcc.gnu.org/onlinedocs/gcc/SPARC-Options.html
6. Run make-config.sh on Sparc
target # sh make-config.sh --arch=sparc --prefix=/usr
7. The host machine and the target machine alternately run the two-stage host and target generation scripts:
host # sh make-host-1.sh
target # sh make-target-1.sh
host # sh make-host-2.sh
target # sh make-target-2.sh
target # sh make-target-contrib.sh
If there are some errors here, indicating that there are some problems with the setting of Step 5 Config.
8. Install
target # sh install.sh
9. Run the installed SBCL

Looks OK ^_^
Email: zzk@bah4i.xyz