OpenOrbis / mira-project

mira rewrite in cxx
GNU General Public License v3.0
290 stars 65 forks source link

Build quick fix for LLVM 16 #162

Open pipehuffer opened 1 year ago

pipehuffer commented 1 year ago

This patch removes -Werror flag so builds don't error out on a unsafe __builtin_frame_address() usage warning (which doesn't seem to matter to Orbis) and some unused variables. It also adds the -fno-stack-protector flag, since without it, it requires a implementation for __stack_chk_fail due to Mira being built for a freestanding environment (it could be implemented later if stack protection is desired).

Tested under LLVM 16.0.3, on a Base PS4 with firmware 9.00, and on top of the chendo-offset-fix branch.

pipehuffer commented 1 year ago

Forgot to add a change to the linker used when building the loader: Trying to execute a loader linked with ld from binutils 2.40 crashes my console, where one linked ld.lld works fine. Don't know what causes it, but a quick binary diff over the two shows significant differences. Both ld and ld.lld builds of the kernel work fine on my end, and its default linker could be changed to ld.lld as well if you'd like.