Now the full GCC toolchain and musl should be in your /opt/cross/ mipsel– linux-musl directory.
I usually install sed in /opt/sed/bin because it has to be used when building GNU projects. The macOS built-in sed does not support the features needed. installer -pkg /path/to/application.pkg -target /Applications 3. You also have to download and install GNU sed utility. Enter the following command to install it as an administrator. export WDIR=/tmpĮxport BUILD=x86_64-apple-darwin$(uname -r) Let’s define all the variables we will use while building it.
Now you have to install C headers in the /usr/include by running the following command: sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / To install spim, paste this in macOS terminal after installing MacPorts.
Most of the steps apply for other operating systems, but there are some quirks to be done to do it on macOS.įirst, you have to make sure that Xcode command-line tools are installed. I have written this post as notes for myself on how to buld a GCC (with musl) toolchain for MIPS on macOS. Download the precompiled watch command from Terminal.