Page 1 of 1

Toolchain, libraries and headers relationship

Posted: March 10th, 2017, 4:51 pm
by pool7
Ok, this will sound either really crazy, or really noob (or maybe both), but I thought I'd ask anyway:
The official SCE PS1 SDK (or whatever you want to call it) includes compilers, libraries and header files (plus other stuff irrelevant to this post).

Now, let's say I want to build my own compiler, or build a newer version of GCC with support for PS1 executables.
Would I be able to just grab the libs and headers and use them directly?
Or are libs/headers somehow dependent on the compiler they are bundled with?
Of course the questions assume same host and target platforms for the compilers.

Re: Toolchain, libraries and headers relationship

Posted: March 10th, 2017, 5:00 pm
by Shadow
No, you can use the latest GCC with the Psy-Q libs.

Re: Toolchain, libraries and headers relationship

Posted: March 11th, 2017, 2:46 am
by pool7
Not to get lost in translation... is that a:
1-Yes, you can grab the libs/headers and use them, they are indepentend of the compiler
or
2-No, you can't use them as-is, there is some kind of dependency between compiler and libs/headers.

Re: Toolchain, libraries and headers relationship

Posted: March 11th, 2017, 3:59 am
by Shadow
1. I'm certain that you can use GCC with the libs. I'm not too sure about the headers though, but I've seen companies use versions of GCC over CCPSX. I might have been mistaken above when I said any version though, because it actually might be a particular version or build of GCC. I'm not 100% sure on that part. I might actually be confusing this with the Yaroze, but I'm sure I saw some PlayStation build use GCC directly... It might have been the T-Rex demo.

When I do a version dump on CCPSX, I get:

Code: Select all

CCPSX 3.06.0017 (Win32, PSX version 3.02).
GNU C version 2.95.2 19991024 BUILD 4.0.0030 (PSX) compiled by CC.
CC for PlayStation (SDevTC) v3.06.0017 (Win32) (C) SN Systems Software Ltd 1998.

Re: Toolchain, libraries and headers relationship

Posted: March 13th, 2017, 3:20 am
by Sblorgz
You will be stuck with PSY-Q linking format being incompatible. The whole toolchain is entirely based on custom builds of GCC, which also include customized object and library formats. Unless you can convert them to whatever GCC uses these days (was it ELF?), you cannot use a more recent build of GCC.