The assembly for apple_arm64 is adapted from linux_arm64 target with small modifications:
1. Re-enable FPU conditional save/restore as apple_x86_64 does
2. Workaround limitation in relocation in assembly for clang
The original call would jump to a meaningless low address on error,
but the upstream Boost context and 32bit version of this function
call exit to properly terminate the code when this error occurs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6820
- Allows specifying FIBER_FLAG_FLOAT_SWITCH to save FP registers (it doesnt by default on win32 but does on win64)
- Specify a commit stack size one byte less than the reserve stack size or else Windows rounds up to the nearest allocation size above the desired size
Changing the section like this in inline assembly
is not supported, and leads to issues because code
following the inline assembly macro ends up in the
wrong assembly section. This was causing linking
errors on gcc.
The files appear to be compiled so that the stack
isn't executable anyway, so we don't need to manually
create the section to say that.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93190