From b2072fb340a10c6b0a8f6c319bddca08491e7c77 Mon Sep 17 00:00:00 2001 From: Bill Roberts Date: Fri, 19 Jan 2024 10:51:12 -0600 Subject: [PATCH] build: support lib64 out directories Signed-off-by: Bill Roberts --- psa-crypto-sys/build.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/psa-crypto-sys/build.rs b/psa-crypto-sys/build.rs index 6eb2a4b..25bddec 100644 --- a/psa-crypto-sys/build.rs +++ b/psa-crypto-sys/build.rs @@ -308,6 +308,10 @@ mod operations { let mut mbed_lib_dir = compile_mbed_crypto()?; let mut mbed_include_dir = mbed_lib_dir.clone(); mbed_lib_dir.push("lib"); + if !mbed_lib_dir.as_path().exists() { + _ = mbed_lib_dir.pop(); + mbed_lib_dir.push("lib64"); + } mbed_include_dir.push("include"); lib = mbed_lib_dir.to_str().unwrap().to_owned(); @@ -357,6 +361,11 @@ mod operations { let mut mbed_lib_dir = compile_mbed_crypto()?; let mut mbed_include_dir = mbed_lib_dir.clone(); mbed_lib_dir.push("lib"); + if !mbed_lib_dir.as_path().exists() { + _ = mbed_lib_dir.pop(); + mbed_lib_dir.push("lib64"); + } + mbed_include_dir.push("include"); let main_lib = mbed_lib_dir.join("libmbedcrypto.a"); @@ -388,6 +397,7 @@ mod operations { let (from, _) = &lib; args.push(from.as_os_str()); } + println!("BILL: args: {:?}", args); let output = std::process::Command::new("nm") .args(args) .output()