The GUILE_ENABLE_JIT m4 macro should _not_enable JIT on the Apple
silicon. That's going to take a real port.
This may help in detecting the M1 as long as build==host.
apple_silicon=`sysctl machdep.cpu.brand_string 2>/dev/null | grep
-i -c "Apple M1"`
If a cross-compile is happening, then TAR
This looks like the Apple article of interest:
https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon.
According to the article, the page should be mapped with MAP_JIT.
Before instructions are written, pthread_jit_write_protect_np should
be called.
Dammit, check for the proper return value...
% cat mmap-test.c
#include
#include
#include
#include
int main(int argc, char* argv[])
{
size_t len = 10;
int prot = PROT_EXEC | PROT_READ | PROT_WRITE;
int flags = MAP_PRIVATE | MAP_ANONYMOUS;
void *p = mmap (NULL, len, prot, flags
I'm looking at OS X's man page on mmap. The EACCES does not seem to
fit one of the stated reasons in the man page. Also see
https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/mmap.2.html.
I have two theories, both of which are guesses. Neither seems