hnes / libaco

A blazing fast and lightweight C asymmetric coroutine library 💎 ⛅🚀⛅🌞
https://libaco.org
Apache License 2.0
3.51k stars 391 forks source link

Add support for aarch64 #38

Open postwait opened 4 years ago

techbech commented 3 years ago

I'm sure the new Apple M1 users would love to see support for this :smile:

postwait commented 3 years ago

We're running the code here successfully: https://github.com/circonus-labs/libmtev/tree/master/src/aco

bmcdorman commented 3 years ago

You just saved me a lot of time! Thanks!

CarterLi commented 3 years ago

Any chance to merge this? @hnes

loongs-zhang commented 2 years ago

Hello, when I merge https://github.com/hnes/libaco/pull/38 into https://github.com/dragon-zhang/libaco, still unable to compile, the following is the error report of compilation :

Undefined symbols for architecture arm64:
  "_main", referenced from:
     implicit entry/start for main executable
  "aco_funcp_protector_asm", referenced from:
      _aco_share_stack_new2 in aco.c.o
  "aco_save_fpucw_mxcsr", referenced from:
      _aco_thread_init in aco.c.o
  "acosw", referenced from:
      _aco_resume in aco.c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libaco] Error 1
make[2]: *** [CMakeFiles/libaco.dir/all] Error 2
make[1]: *** [CMakeFiles/libaco.dir/rule] Error 2
make: *** [libaco] Error 2

here is the CMakeLists.txt:

cmake_minimum_required(VERSION 3.19)
project(libaco C)

set(CMAKE_C_STANDARD 11)

include_directories(.)

add_executable(libaco
        aco.c
        aco.h
        aco_assert_override.h)

can you guyes offering some help ?

loongs-zhang commented 2 years ago

By the way, my chip is apple m1.

RovingStone commented 11 months ago

Hello, when I merge #38 into https://github.com/dragon-zhang/libaco, still unable to compile, the following is the error report of compilation

You need to add acosw.S source file to your add_executable call.