mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-09 18:43:45 +00:00
Add macOS instructions for installing mips-linux-gnu-gcc (#2508)
* Add macOS instructions for installing mips-linux-gnu-gcc * Add --with-system-zlib to fix binutils build on macOS 15.3.1
This commit is contained in:
parent
2341c44a6c
commit
d4528a0541
1 changed files with 43 additions and 2 deletions
|
@ -55,12 +55,12 @@ cd build-binutils
|
|||
|
||||
Configure the build
|
||||
```bash
|
||||
../binutils-2.35/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-gprof --disable-gdb --disable-werror
|
||||
../binutils-2.35/configure --target=mips-linux-gnu --prefix=/opt/cross --with-system-zlib --disable-gprof --disable-gdb --disable-werror
|
||||
```
|
||||
|
||||
Make and install binutils
|
||||
```bash
|
||||
make -j
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
```
|
||||
|
||||
|
@ -82,3 +82,44 @@ If this worked, you can now delete the temporary directory `~/binutils-tmp`.
|
|||
Apple's version of `make` is very out-of-date, so you should use the brew-installed `gmake` in place of `make` in this repo from now on.
|
||||
|
||||
You should now be able to continue from [step 2](../README.md#2-clone-the-repository) of the Linux instructions.
|
||||
|
||||
|
||||
## 4. Building GCC (optional)
|
||||
|
||||
If you'd like to compile with GCC instead of IDO (e.g. for modding), you can build it from source similarly to how we built binutils:
|
||||
|
||||
Install dependences
|
||||
```bash
|
||||
brew install gcc@14 gmp isl libmpc mpfr
|
||||
```
|
||||
|
||||
Create and enter local working dir
|
||||
```bash
|
||||
mkdir ~/gcc-tmp
|
||||
cd ~/gcc-tmp
|
||||
```
|
||||
|
||||
Get and extract gcc source
|
||||
```bash
|
||||
curl -O https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz
|
||||
tar xvf gcc-14.2.0.tar.xz
|
||||
```
|
||||
|
||||
Create and enter a build directory
|
||||
```bash
|
||||
mkdir build-gcc
|
||||
cd build-gcc
|
||||
```
|
||||
|
||||
Configure the build
|
||||
```bash
|
||||
CC=gcc-14 CXX=g++-14 ../gcc-14.2.0/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-nls --enable-languages=c --with-gmp=$(brew --prefix)/opt/gmp --with-mpfr=$(brew --prefix)/opt/mpfr --with-mpc=$(brew --prefix)/opt/libmpc --with-isl=$(brew --prefix)/opt/isl
|
||||
```
|
||||
|
||||
Make and install gcc
|
||||
```bash
|
||||
CC=gcc-14 CXX=g++-14 make all-gcc -j$(nproc)
|
||||
sudo make install-gcc
|
||||
```
|
||||
|
||||
If this worked, you can now delete the temporary directory `~/gcc-tmp`.
|
||||
|
|
Loading…
Add table
Reference in a new issue