-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Included zlib is built with optional instructions on aarch64 #48008
Comments
It does; see deps/zlib/cpu_features.c, the Apropos gcc: it doesn't support setting target machine attributes on a per-function basis1, only per compilation unit. If that's the problem you're hitting, try building with clang instead. 1 Newer gcc versions possibly do. You can try submitting a fix to the upstream project; it's Chromium's zlib fork. |
On an old GCC version, compilation failes with
on a Raspberry Pi 4, which suggests that it doesn't suggest instructions in practice. The documentation lists |
Yes, and it's building fine on our CI. The problem is likely local to your toolchain. |
I'll close this out but let me know if there's still something to do or discuss. |
Version
18.16.0 and 18.15.0
Platform
Linux c9869ce0a7f0 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 aarch64 aarch64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
No response
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
It should check the host CPU for the available instructions and/or there should be a command line switch for building without
aes
instructions.What do you see instead?
The included Zlib is hardcoded to be built with
-march=armv8-a+aes+crc
on AArch64. Common AArch64 devices such as the Raspberry Pi 4 don't supportaes
instructions.Additional information
Changing this in line 69 (v18.16.0) of
deps/zlib/zlib.gyp
tothrows Assembler errors:
This happens on both, GCC 11.3.0 and on GCC 7.5.0
The text was updated successfully, but these errors were encountered: