How to compile for macOS M1 (Apple Silicon)? #33
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: ariadne/libucontext#33
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
I have no idea, how to compile this :(
I tried
make
, but with no luck.I tried
meson
, justWith no luck either:
encoupled with an error "The deprecated ucontext routines require _XOPEN_SOURCE to be defined"
All in all, how can it be compiled and installed into the system?
I want to use it instead of
makecontext
and others while porting source code of my project to M1try compile like that:
For object files:
cd arch/aarch64 && cc *.c *.S -I. -I../common -Iinclude -I../../include -fPIC -DPIC -O2 -ggdb3 -D_BSD_SOURCE -std=gnu99 -c
Archive objects to static library (libucontext.a):
ar rcs libucontext.a *.o
Compile objects to dynamic library (libucontext.dylib):
cc -dynamiclib -o libucontext.1.dylib -compatibility_version 1 -current_version 1 *.o
The non-Meson build system should now work. I'll cut a new release shortly.