This is an automated email from the ASF dual-hosted git repository. yuanz pushed a commit to branch no-std in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git
commit 31066fcb76256551d2bc47e9bed4924918b90c71 Author: Sumit Garg <[email protected]> AuthorDate: Mon Jan 8 16:15:50 2024 +0530 examples: ta: build.rs: Use TARGET instead of custom ARCH TARGET is standardized rust environment variable to provide full target triplet, so use that to distinguish rather than custom ARCH which will be dropped in a future patch. Signed-off-by: Sumit Garg <[email protected]> --- examples/acipher-rs/ta/build.rs | 4 ++-- examples/aes-rs/ta/build.rs | 4 ++-- examples/authentication-rs/ta/build.rs | 4 ++-- examples/big_int-rs/ta/build.rs | 4 ++-- examples/diffie_hellman-rs/ta/build.rs | 4 ++-- examples/digest-rs/ta/build.rs | 4 ++-- examples/hello_world-rs/ta/build.rs | 4 ++-- examples/hotp-rs/ta/build.rs | 4 ++-- examples/random-rs/ta/build.rs | 4 ++-- examples/secure_storage-rs/ta/build.rs | 4 ++-- examples/signature_verification-rs/ta/build.rs | 4 ++-- examples/supp_plugin-rs/ta/build.rs | 4 ++-- examples/time-rs/ta/build.rs | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/examples/acipher-rs/ta/build.rs b/examples/acipher-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/acipher-rs/ta/build.rs +++ b/examples/acipher-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/aes-rs/ta/build.rs b/examples/aes-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/aes-rs/ta/build.rs +++ b/examples/aes-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/authentication-rs/ta/build.rs b/examples/authentication-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/authentication-rs/ta/build.rs +++ b/examples/authentication-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/big_int-rs/ta/build.rs b/examples/big_int-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/big_int-rs/ta/build.rs +++ b/examples/big_int-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/diffie_hellman-rs/ta/build.rs b/examples/diffie_hellman-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/diffie_hellman-rs/ta/build.rs +++ b/examples/diffie_hellman-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/digest-rs/ta/build.rs b/examples/digest-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/digest-rs/ta/build.rs +++ b/examples/digest-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/hello_world-rs/ta/build.rs b/examples/hello_world-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/hello_world-rs/ta/build.rs +++ b/examples/hello_world-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/hotp-rs/ta/build.rs b/examples/hotp-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/hotp-rs/ta/build.rs +++ b/examples/hotp-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/random-rs/ta/build.rs b/examples/random-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/random-rs/ta/build.rs +++ b/examples/random-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/secure_storage-rs/ta/build.rs b/examples/secure_storage-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/secure_storage-rs/ta/build.rs +++ b/examples/secure_storage-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/signature_verification-rs/ta/build.rs b/examples/signature_verification-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/signature_verification-rs/ta/build.rs +++ b/examples/signature_verification-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/supp_plugin-rs/ta/build.rs b/examples/supp_plugin-rs/ta/build.rs index 306c0b5..12d8660 100644 --- a/examples/supp_plugin-rs/ta/build.rs +++ b/examples/supp_plugin-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; diff --git a/examples/time-rs/ta/build.rs b/examples/time-rs/ta/build.rs index 2143714..19aae62 100644 --- a/examples/time-rs/ta/build.rs +++ b/examples/time-rs/ta/build.rs @@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> { let f = File::open(optee_os_path.join("src/ta.ld.S"))?; let f = BufReader::new(f); - match env::var("ARCH") { - Ok(ref v) if v == "arm" => { + match env::var("TARGET") { + Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => { println!("cargo:rustc-link-arg=--no-warn-mismatch"); for line in f.lines() { let l = line?; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
