From 727d37a0162108381baea64ffabca7c9a8714600 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Fri, 10 Dec 2021 09:05:37 -0700 Subject: Revert "Fix invalid freebsd version selection" This reverts commit 53e79b886bf4e4d3682ae6669e3585b3586e5255. PR #2581 unintentionally changed libc's bindings from the FreeBSD 11 ABI to the native ABI of the build host. This is causing breakage for many downstream crates. --- build.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/build.rs b/build.rs index 39eeb3b785..61acba646d 100644 --- a/build.rs +++ b/build.rs @@ -25,11 +25,13 @@ 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) => println!("cargo:rustc-cfg=freebsd10"), - Some(11) => println!("cargo:rustc-cfg=freebsd11"), - Some(12) => println!("cargo:rustc-cfg=freebsd12"), - Some(13) => println!("cargo:rustc-cfg=freebsd13"), - Some(14) => println!("cargo:rustc-cfg=freebsd14"), + 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(14) if libc_ci => println!("cargo:rustc-cfg=freebsd14"), Some(_) | None => println!("cargo:rustc-cfg=freebsd11"), } -- cgit v1.2.1