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
239 stars 73 forks source link

question about the targets of stage 1 and stage 2 gcc build #52

Closed sl1pkn07 closed 5 years ago

sl1pkn07 commented 5 years ago

Hi

i have a one question about the stage1 and stage2 gcc build steps

why the stage1 have as target ee and iop and the stage 2 only have ee?

https://github.com/ps2dev/ps2toolchain/blob/master/scripts/002-gcc-3.2.3-stage1.sh#L40 https://github.com/ps2dev/ps2toolchain/blob/master/scripts/004-gcc-3.2.3-stage2.sh#L39

also, stage1 enable only c language and stage2 enables c and c++

if i build the toolchain separately without use the main build scripts (but patching the sources adequately), i can build the stage2 with ee and iop targets?

i say this because i install the toolchain separately in their own package (one for binutils, other for stage1 gcc, other for newlib, other for stage2 gcc, other for ps2sdk, etc etc) but when install the stage2 i need remove the stage1 gcc for avoid file conflicts when install the package (same file include in the both packages)

greetings

sp193 commented 5 years ago

We need to build GCC first, before Newlib can be built, before we can build GCC with support for Newlib. We use Newlib exclusively for C++, while the ps2sdk's libc is used for C. It may be possible to just use Newlib.

We do not support C++ for the IOP, as it is not a target with a lot of resources. So there is not much point in using C++ there.

sl1pkn07 commented 5 years ago

We need to build GCC first, before Newlib can be built, before we can build GCC with support for Newlib.

yep, i doing this, is like my distro doing , no problem here

We use Newlib exclusively for C++, while the ps2sdk's libc is used for C. It may be possible to just use Newlib.

We do not support C++ for the IOP, as it is not a target with a lot of resources. So there is not much point in using C++ there.

but i can build it? even though is not used

greetings

fjtrujy commented 5 years ago

Hi @sl1pkn07 ! You have put some spanish translation, I think that @sp193 doesn't know Spanish xD, please edit the previous message. Interesting topic by the way Thanks!

sl1pkn07 commented 5 years ago

ops!

my english is not good also xd

pats to chrome/ium when send the comment if the translation is active xd

sp193 commented 5 years ago

I doubt it will compile because it will not recognize the "iop" target. For Newlib to support a new target, it has to be customized for the target.

In the case of the IOP, we use the Sony libraries. So the C compiler does not come with any libraries, other than libgcc, which contains some additional functions for GCC that are implemented in software.