Skip to content

Commit

Permalink
examples: Fix rust build for Arm 32-bit mode
Browse files Browse the repository at this point in the history
arm-none-linux-gnueabihf-ld.bfd reports EABI version mismatch issue,
drop that error via adding "--no-warn-mismatch" linker flag.

Signed-off-by: Sumit Garg <[email protected]>
  • Loading branch information
b49020 authored and DemesneGH committed Jan 3, 2024
1 parent a85d031 commit 6309d58
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/acipher-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/aes-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/authentication-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/big_int-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/diffie_hellman-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/digest-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/hello_world-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/hotp-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/random-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/secure_storage-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/signature_verification-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/supp_plugin-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down
1 change: 1 addition & 0 deletions examples/time-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn main() -> std::io::Result<()> {

match env::var("ARCH") {
Ok(ref v) if v == "arm" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;

Expand Down

0 comments on commit 6309d58

Please sign in to comment.