ps2dev / ps2toolchain

This program will automatically build and install a compiler and other tools used in the creation of homebrew software for the Sony PlayStation® 2 videogame system.
BSD 2-Clause "Simplified" License
236 stars 71 forks source link

GCC version update #54

Closed GeoVa19 closed 4 years ago

GeoVa19 commented 5 years ago

This may sound as a joke, but will it be possible to update GCC to a newer version, so that we can use C11 and C++11 or later?

I understand that the PS2 is a console which was released in 2000 and its architecture is fairly complex, but devkitpro, the homebrew dev suite for Nintendo consoles, have upgraded the GCC to version 9.

Could the PS2 handle modern C and C++ features?

fjtrujy commented 5 years ago

Is not fully supported, but @uyjulian is working into port it, you can give a try here. https://github.com/uyjulian/ps2toolchain/tree/uyjworking

Remember the branch that he is using is uyjworking

Give a try, but for sure things are not working as expected.

uyjulian commented 5 years ago

Please be aware that support for floating point is broken in my port.

rickgaiser commented 5 years ago

@uyjulian What's the last known good combination of GCC and binutils?

I got up to gcc 6.3.0 and binutils 2.24 for compiling Linux. (not for compiling ps2dev/ps2sdk)

uyjulian commented 5 years ago

GCC 9.1/binutils 2.32 works great for Fredrik Noring's port of Linux.

Floating point support is broken on all the nabi toolchains. It currently only works correctly under emulation (e.g. Linux)

GeoVa19 commented 5 years ago

@uyjulian I tried to build your ps2toolchain today and I have an issue. (There's no Issues tab on your repository, so I'm posting it here.) I was on the 2nd stage of GCC and the computer froze. I did a hard reboot and tried again, now with the system monitor on. And I noticed that during compilation the usage of RAM reached 90 percent! Then of course I stopped the compilation.

I'm on Ubuntu 18.04 and I have 16 GB RAM. Is this normal? Is there any workaround?

uyjulian commented 5 years ago

What is the output of nproc ?

GeoVa19 commented 5 years ago

6

uyjulian commented 5 years ago

Try adding more swap and/or zram.

sp193 commented 4 years ago

The problem is that a lot of work is required to make a new set of tools that will support all features of the R5900 and its quirks. We do have official support for the R5900 in GCC, but it does not support any of the features that other MIPS do not have. So even if you do have a new toolchain, I don't think it's really any better than the 16-year old tools we have if it doesn't support the R5900 fully.

Unless the new versions of GCC really cannot be built by older hardware, my laptop that I was using in 2015 only had 4GB lol.