Changeset View
Changeset View
Standalone View
Standalone View
lang/rust/files/riscv64/patch-vendor_libc-0.2.98_build.rs
- This file was added.
--- vendor/libc-0.2.98/build.rs.orig 2021-10-18 11:05:54 UTC | |||||
+++ vendor/libc-0.2.98/build.rs | |||||
@@ -24,14 +24,19 @@ fn main() { | |||||
// | |||||
// On CI, we detect the actual FreeBSD version and match its ABI exactly, | |||||
// running tests to ensure that the ABI is correct. | |||||
- match which_freebsd() { | |||||
- Some(10) if libc_ci || rustc_dep_of_std => { | |||||
- println!("cargo:rustc-cfg=freebsd10") | |||||
+ let target = env::var("TARGET").expect("TARGET was not set"); | |||||
+ if target == "riscv64gc-unknown-freebsd" { | |||||
+ println!("cargo:rustc-cfg=freebsd13") | |||||
+ } else { | |||||
+ match which_freebsd() { | |||||
+ Some(10) if libc_ci || rustc_dep_of_std => { | |||||
+ println!("cargo:rustc-cfg=freebsd10") | |||||
+ } | |||||
+ Some(11) if libc_ci => println!("cargo:rustc-cfg=freebsd11"), | |||||
+ Some(12) if libc_ci => println!("cargo:rustc-cfg=freebsd12"), | |||||
+ Some(13) if libc_ci => println!("cargo:rustc-cfg=freebsd13"), | |||||
+ Some(_) | None => println!("cargo:rustc-cfg=freebsd11"), | |||||
} | |||||
- Some(11) if libc_ci => println!("cargo:rustc-cfg=freebsd11"), | |||||
- Some(12) if libc_ci => println!("cargo:rustc-cfg=freebsd12"), | |||||
- Some(13) if libc_ci => println!("cargo:rustc-cfg=freebsd13"), | |||||
- Some(_) | None => println!("cargo:rustc-cfg=freebsd11"), | |||||
} | |||||
// On CI: deny all warnings |