hitsumabushi
hitsumabushi copied to clipboard
Disable multiple C stub functions
One of the root problems is that the PlayStation does not have <signal.h>
, so we need to disable this header in gcc_linux_amd64.c
. But then it also makes sense to disable it in gcc_linux_arm64.c
since it’ll just call stubs anyway.
Other parts of the Go runtime use networking-related headers such as <netdb.h>
or <netinet/in.h>
to retrieve constants, so these need to be disabled for the PlayStation compiler, too.
We can actually do the same for calls to e.g. setenv
, or setgid
, etc. In the end, it is possible to get rid of all C stubs in hitsumabushi_syscalls_linux.c
.
This was successfully tested with the following setups:
- Nintendo Switch (with native
clang.exe
from NDK 15.2) - PS4 (with native
clang.exe
from SDK 10.000) - PS5 (with native
clang.exe
from SDK 5.000)