1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 09:45:02 +00:00
oot/docs/BUILDING_BINUTILS_CYGWIN.md
Random be84e1f0f8
Add Cygwin support (#594)
* Add Cygwin support

* revert .gitignore changes

* Add Cygwin instructions

* corrections

* specify dependencies in README.md
2021-01-20 14:46:25 -05:00

1.2 KiB

Building mips-linux-binutils on Windows using Cygwin

First, you will need to install the following packages using the Cygwin installer:

  • make
  • gcc-g++
  • bison
  • flex
  • texinfo
  • binutils (Make sure to check the "Src?" checkbox since we're interested in the source code. Once the download is finished, you will find it in /usr/src/)

Create destination dir for binutils

sudo mkdir -p /opt/cross

Extract binutils source

cd /usr/src/binutils-[...].src/
tar xjf binutils-[...].tar.bz2

Create and enter build dir

mkdir build-binutils
cd build-binutils

Configure the build

../binutils-gdb/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-gprof --disable-nls --disable-werror --disable-gdb --disable-libdecnumber --disable-readline --disable-sim

Make and install binutils

make -j
sudo make install -j

Add the new binutils binaries to your system PATH:

You can do that by adding PATH=$PATH:/opt/cross/bin to ~/.bashrc and then reloading ~/.bashrc.

Alternatively you can edit the Path variable in Edit the system environment variables>Environment Variables (in which case you will need to relaunch your terminal).