From ee77b60e2a3662c365ae49b745e6a07315688558 Mon Sep 17 00:00:00 2001 From: gioelece <51095762+gioelece@users.noreply.github.com> Date: Mon, 3 Mar 2025 10:12:12 +0100 Subject: [PATCH] Set gcc architecture to armv8.2-a when building for aarch64 (#81) armv8-a does not actually support sha3, see https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html --- pqcrypto-internals/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pqcrypto-internals/build.rs b/pqcrypto-internals/build.rs index 112d096..97bdcb6 100644 --- a/pqcrypto-internals/build.rs +++ b/pqcrypto-internals/build.rs @@ -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");