[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for aarch64 #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

postwait
Copy link
Contributor

No description provided.

@techbech
Copy link
Contributor
techbech commented Jan 6, 2021

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

@postwait
Copy link
Contributor Author
postwait commented Jan 6, 2021

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

@techbech techbech mentioned this pull request Jan 7, 2021
@bmcdorman
Copy link

You just saved me a lot of time! Thanks!

@CarterLi
Copy link
Contributor

Any chance to merge this? @hnes

mov x9, sp
and x9, x9, #0xfffffffffffffff0
mov sp, x9
bl aco_funcp_protector
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#if defined(APPLE)
bl _aco_funcp_protector
bl _abort
#else
bl aco_funcp_protector
bl abort
#endif

@loongs-zhang
Copy link

Hello, when I merge #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
Copy link

By the way, my chip is apple m1.

@RovingStone
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants