Create WSL setup scripts

This commit is contained in:
jaby 2023-10-19 20:58:22 -05:00
parent 7ef21179b3
commit c2db083539
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1 @@
sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

55
wsl_scripts/make_gcc.sh Normal file
View File

@ -0,0 +1,55 @@
#!/bin/bash
mkdir -p psx-gcc
cd psx-gcc
echo "clone binutils"
git clone git://sourceware.org/git/binutils-gdb.git
cd binutils-gdb
mkdir -p build
cd build
echo "Configure binutils"
../configure --target=mipsel-linux-gnu --with-sysroot --disable-nls --disable-werror
if [ $? -ne 0 ]; then
exit 1
fi
echo "Make binutils"
make
if [ $? -ne 0 ]; then
exit 1
fi
echo "Install binutils"
sudo make install
if [ $? -ne 0 ]; then
exit 1
fi
cd ../..
echo "clone gcc"
git clone --recurse-submodules git://gcc.gnu.org/git/gcc.git
cd gcc
echo "checkout gcc 13.1.0"
git checkout releases/gcc-13.1.0
mkdir -p build
cd build
echo "configure gcc"
../configure --target=mipsel-linux-gnu --disable-nls --enable-languages=c,c++ --without-headers
if [ $? -ne 0 ]; then
exit 1
fi
echo "Make gcc"
make all-gcc
if [ $? -ne 0 ]; then
exit 1
fi
echo "Install gcc"
sudo make install-gcc
if [ $? -ne 0 ]; then
exit 1
fi

View File

@ -0,0 +1,3 @@
#!/bin/bash
sudo apt update
sudo apt install make texinfo g++ gcc libgmp3-dev libmpfr-dev libmpc-dev flex install-info info bison