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

Support for __aarch64__ flag #333

Open
lmtr0 opened this issue Mar 25, 2022 · 11 comments
Open

Support for __aarch64__ flag #333

lmtr0 opened this issue Mar 25, 2022 · 11 comments

Comments

@lmtr0
Copy link

lmtr0 commented Mar 25, 2022

As pointed out in briansmith/ring#1442 it appears that the o64h-clang is not setting any arm flags:

@tpoechtrager
Copy link
Owner

OS? Clang compiler version?

@lmtr0
Copy link
Author

lmtr0 commented Mar 25, 2022

Well clang was 13 and the os i tested was arch Linux container but it also doesn't work in Ubuntu, Manjaro and fedora with MacOS SDK 11.3

@lmtr0
Copy link
Author

lmtr0 commented Mar 25, 2022

I was compiling a project in rust that had dependency in ring which is the crate broke the build. Btw starting the compilation with system clang fails but then switching to osxcross then works

@JimChenWYU
Copy link

how about it? I met the same error, can not compile briansmith/ring

@lmtr0
Copy link
Author

lmtr0 commented Oct 16, 2022

use -D__aarch64__

@lmtr0
Copy link
Author

lmtr0 commented Oct 16, 2022

in .cargo/config.toml:

[target.aarch64-apple-darwin]
rustflags = ["-C", "link-args=-D__aarch64__"]
linker = "o64h-clang"
ar = "aarch64-apple-darwin20.4-ar"

@JimChenWYU
Copy link

@lmtr0 got same error
I had run cargo clean

.cargo/config.toml

[build]
target = "aarch64-apple-darwin"

[target.aarch64-apple-darwin]
rustflags = ["-C", "link-args=-D__aarch64__"]
linker = "/osxcross/bin/aarch64-apple-darwin20.4-clang"
ar = "/osxcross/bin/aarch64-apple-darwin20.4-ar"

o64h-clang I found it is same as /osxcross/bin/aarch64-apple-darwin20.4-clang

@lmtr0
Copy link
Author

lmtr0 commented Oct 16, 2022

can you switch to sodiumoxide? I did that since I couldn't solve it

@JimChenWYU
Copy link

I can not, it's not my application depend on ring, it's other package

@lmtr0
Copy link
Author

lmtr0 commented Oct 19, 2022

Sorry then, this sounds to be a problem with the compiler....
maybe @tpoechtrager can help more, I just switched to libsodium cause I couldn't solve it then and I can't solve it now

@briansmith
Copy link

The latest version of ring (0.17.0) doesn't use __aarch64__ any more. It uses __ARM_ARCH. If clang isn't defining these automatically __ARM_ARCH for an aarch64-* target then there is indeed something wrong.

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

No branches or pull requests

4 participants