From PS3 Developer wiki
Revision as of 16:04, 7 December 2017 by Zecoxao (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

I had trouble compiling the toolchain in cygwin, the issue was with binutils failing with this error:

checking for int_least32_t... ../../libiberty/pex-unix.c: In function ‘pex_unix_exec_child’:
../../libiberty/pex-unix.c:549:2: warning: implicit declaration of function ‘spawnvpe’
../../libiberty/pex-unix.c:549:18: error: ‘_P_NOWAITO’ undeclared (first use in this function)
../../libiberty/pex-unix.c:549:18: note: each undeclared identifier is reported only once for each function it appears in
../../libiberty/pex-unix.c:551:2: warning: implicit declaration of function ‘spawnve’
Makefile:887: recipe for target `pex-unix.o' failed
make[2]: *** [pex-unix.o] Error 1
make[2]: Leaving directory `/home/TroyGerrie/ps3toolchain/build/binutils-2.21.1/build-ppu/libiberty'
Makefile:9242: recipe for target `all-libiberty' failed
make[1]: *** [all-libiberty] Error 2
make[1]: *** Waiting for unfinished jobs....

I managed to fix this with a dirty HACK on pex-unix.c to include the correct value, in retrospect I should have just defined it. You can replace patches/binutils-2.22-PS3.patch with this (you might wan't to clean the unpacked files out of your build/ dir first):

diff -burN --exclude=.git binutils-2.22/ld/emultempl/spuelf.em binutils-2.22-PS3/ld/emultempl/spuelf.em
--- binutils-2.22/ld/emultempl/spuelf.em	2011-01-13 08:06:22.000000000 -0500
+++ binutils-2.22-PS3/ld/emultempl/spuelf.em	2012-01-25 18:30:17.000000000 -0500
@@ -397,7 +397,11 @@
   argv[my_argc++] = "-T";
   argv[my_argc++] = auto_overlay_file;
   argv[my_argc] = 0;
+#if defined(_WIN32)
+  execvp (argv[0], (const char* const*) argv);
   execvp (argv[0], (char *const *) argv);
   perror (argv[0]);
   _exit (127);
diff -burN --exclude=.git binutils-2.22/libiberty/pex-unix.c binutils-2.22-PS3/libiberty/pex-unix.c
--- binutils-2.22/libiberty/pex-unix.c	2011-01-04 10:05:58.000000000 +1300
+++ binutils-2.22-PS3/libiberty/pex-unix.c	2012-02-10 22:07:45.443501700 +1300
@@ -546,9 +546,9 @@
       typedef const char * const *cc_cp;
       if (flags & PEX_SEARCH)
-	pid = spawnvpe (_P_NOWAITO, executable, (cc_cp)argv, (cc_cp)env);
+	pid = spawnvpe (3, executable, (cc_cp)argv, (cc_cp)env);
-	pid = spawnve (_P_NOWAITO, executable, (cc_cp)argv, (cc_cp)env);
+	pid = spawnve (3, executable, (cc_cp)argv, (cc_cp)env);
       if (pid > 0)

PSL1GHT speed issues[edit]

  • PSL1GHT (any version of it) has tremendous performance issues when it comes to homebrew and applications developed with it
  • A regular dump_flash gitbrew version takes 2 hours and 15 minutes to dump 239MB of the NAND
  • When the same application is compiled under oficial sony sdk it takes 5 minutes to do the exact same
  • Even more interestingly, compiling ONLY the objects from the psl1ght app and then linking them with the oficial sdk (using ppu-lv2-gcc), when the app is run it takes the same ammount of time as oficial sdk.
  • RPCS3 ran some simple homebrew at the time i tested this. ThatOtherDev's projects ALL ran in 5 or LESS fps, while scooger, an OFICIAL SDK compiled homebrew, ran at 60 FPS.
  • If anyone is willing to find out what the issue is, it'd increase the interest in developing apps under psl1ght