Skip to content

Commit

Permalink
Set gcc architecture to armv8.2-a when building for aarch64 (#81)
Browse files Browse the repository at this point in the history
armv8-a does not actually support sha3, see https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html
  • Loading branch information
gioelece authored Mar 3, 2025
1 parent d822f97 commit ee77b60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pqcrypto-internals/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn main() {
println!("cargo:rustc-link-lib=keccak4x")
} else if target_arch == "aarch64" && target_env != "msvc" {
builder
.flag("-march=armv8-a+sha3")
.flag("-march=armv8.2-a+sha3")
.file(cfiledir.join("keccak2x").join("fips202x2.c"))
.file(cfiledir.join("keccak2x").join("feat.S"))
.compile("keccak2x");
Expand Down

0 comments on commit ee77b60

Please sign in to comment.