aldostools / IRISMAN

All-in-one backup manager for PlayStation®3. Fork of Iris Manager.
GNU General Public License v3.0
241 stars 22 forks source link

build issues with opensource sdk and toolchain #4

Closed lmirel closed 4 years ago

lmirel commented 4 years ago

hello, I'm using https://github.com/bucanero/ps3toolchain and https://github.com/bucanero/PSL1GHT on Ubuntu and while I'm trying to build IRISMAN I get this error: proj/IRISMAN$ make hvcall_341.c /media/nas/PS3/dev/proj/IRISMAN/source/payload341/hvcall_341.c: In function 'lv1_insert_htab_entry341': /media/nas/PS3/dev/proj/IRISMAN/source/payload341/hvcall_341.c:28:5: error: PIC register clobbered by 'r2' in 'asm' asm volatile("mr %%r3, %4;" "mr %%r4, %5;" "mr %%r5, %6;" "mr %%r6, %7;" "mr %%r7, %8;" "mr %%r8, %9;" ^~~ /media/nas/PS3/dev/proj/IRISMAN/source/payload341/hvcall_341.c: In function 'lv1_undocumented_function_114_341': /media/nas/PS3/dev/proj/IRISMAN/source/payload341/hvcall_341.c:50:5: error: PIC register clobbered by 'r2' in 'asm' asm volatile("mr %%r3, %2;" "mr %%r4, %3;" "mr %%r5, %4;" SYSCALL(HVSC_SYSCALL_341) "mr %0, %%r3;" ^~~ /media/nas/PS3/dev/proj/IRISMAN/source/payload341/hvcall_341.c: In function 'lv1_undocumented_function_115_341': /media/nas/PS3/dev/proj/IRISMAN/source/payload341/hvcall_341.c:67:5: error: PIC register clobbered by 'r2' in 'asm' asm volatile("mr %%r3, %0;" SYSCALL(HVSC_SYSCALL_341) ^~~ /usr/local/ps3dev/base_rules:68: recipe for target 'hvcall_341.o' failed make[1]: [hvcall_341.o] Error 1 Makefile:173: recipe for target 'build' failed make: [build] Error 2

any idea why this might be and how to fix it?

thanks in advance!

aldostools commented 4 years ago

I compiled the project using Windows 10 https://github.com/Estwald/PSDK3v2

One option is to use a virtual machine if you can't find a solution. Maybe someone using Linux could assist you.

lmirel commented 4 years ago

it seems like an issue due to the newer gcc version used by the Linux sdk which protects PIC registers by requiring a save/restore. unfortunately I can’t find a way to turn this protection feature off. oh well, back to Windows VM then. thanks

bucanero commented 4 years ago

just as reference, there was a PR related to the new gcc 7.2 and the clobbered registers here: https://github.com/ps3dev/PSL1GHT/pull/68