summaryrefslogtreecommitdiff
path: root/toolchain.txt
diff options
context:
space:
mode:
authorXavi Del Campo <xavi.dcr@tutanota.com>2020-01-31 10:32:23 +0100
committerXavi Del Campo <xavi.dcr@tutanota.com>2020-01-31 10:32:23 +0100
commit7c24e9a9b02b04dcaf9507acb94091ea70a2c02d (patch)
treec28d0748652ad4b4222309e46e6cfc82c0906220 /toolchain.txt
parenta2b7b6bb1cc2f4a3258b7b2dbc92399d151f864d (diff)
Imported pristine psxsdk-20190410 from official repo
Diffstat (limited to 'toolchain.txt')
-rw-r--r--toolchain.txt64
1 files changed, 64 insertions, 0 deletions
diff --git a/toolchain.txt b/toolchain.txt
new file mode 100644
index 0000000..826279e
--- /dev/null
+++ b/toolchain.txt
@@ -0,0 +1,64 @@
+How to build a toolchain for the PSXSDK
+----------------------
+
+If you do not have the patience for this, do not do this. Unless you have
+some less used operating system and/or using a non-x86 processor on your development computer there are precompiled toolchains on the main PSXSDK site for some of the most common operating systems.
+
+These instructions are for Unix-like operating systems, although they will
+probably work also on Cygwin.
+
+To build a toolchain for the PSXSDK, you need to download GNU Binutils
+(http://www.gnu.org/software/binutils/) and GNU GCC (http://gcc.gnu.org)
+
+It is assumed that you want to install the toolchain you are going to build in
+/usr/local/psxsdk. If you don't want to do that simply replace it in the
+commands with something else.
+
+If you are using a *BSD system, replace `make' with `gmake'.
+
+First of all, open a terminal.
+Then the following is a guide for what you will do:
+# export BASEDIR=<directory-where-you-downloaded-binutils-and-gcc-source-archives>
+# cd $BASEDIR
+# mkdir source build
+# tar xjf binutils*bz2 -C source
+# tar xjf gcc*bz2 -C source
+# cd build
+# mkdir psxsdk-binutils
+# mkdir psxsdk-gcc
+# cd psxsdk-binutils
+# $BASEDIR/source/binutils*/configure --disable-nls --prefix=/usr/local/psxsdk --target=mipsel-unknown-elf --with-float=soft
+# make
+# make install
+# cd ..
+# cd psxsdk-gcc
+# $BASEDIR/source/gcc*/configure --disable-nls --disable-libada --disable-libssp --disable-libquadmath --disable-libstdc++-v3 \
+--target=mipsel-unknown-elf --prefix=/usr/local/psxsdk --with-float=soft --enable-languages=c,c++
+# make
+# make install
+
+Replace <directory-where-you-downloaded-binutils-and-gcc-source-archives> with the directory where you
+put the binutils and gcc source archives you downloaded.
+
+If you don't need C++ support, replace "--enable-languages=c,c++" with "--enable-languages=c" and remember
+to set CXX_SUPPORT in Makefile.cfg to `no'; that will avoid C++ support in PSXSDK from being compiled.
+
+Note that on some systems (like NetBSD) for some reason GCC might not build if you run its configure script using a relative path
+(like ..). This happens for a strange reason. In doubt, run the configure script using an absolute path (the complete name of the directory).
+
+Now you just need to build the PSXSDK. Notice that the PSXSDK installs itself
+after building automatically and you will not need to execute a command to install it after building it.
+
+Before building the PSXSDK, edit Makefile.cfg. TOOLCHAIN_PREFIX is very important,
+it specifies the directory where the PSXSDK toolchain is installed in. In our example it is /usr/local/psxsdk (the default)
+
+There should be explanations for the other variables.
+To build the PSXSDK go into its directory, change your path variable to include the PSXSDK toolchain binaries:
+
+export PATH=$PATH:/usr/local/psxsdk/bin
+
+and execute "make".
+
+If everything went well, execute "make install".
+
+PSXSDK should be ready to go! \ No newline at end of file