summaryrefslogtreecommitdiffstats
path: root/vendor/openssl-sys/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/openssl-sys/build
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/openssl-sys/build')
-rw-r--r--vendor/openssl-sys/build/expando.c4
-rw-r--r--vendor/openssl-sys/build/find_normal.rs21
-rw-r--r--vendor/openssl-sys/build/main.rs1
-rw-r--r--vendor/openssl-sys/build/run_bindgen.rs4
4 files changed, 18 insertions, 12 deletions
diff --git a/vendor/openssl-sys/build/expando.c b/vendor/openssl-sys/build/expando.c
index 5d003d902..cd7456b4f 100644
--- a/vendor/openssl-sys/build/expando.c
+++ b/vendor/openssl-sys/build/expando.c
@@ -111,6 +111,10 @@ RUST_CONF_OPENSSL_NO_SSL3_METHOD
RUST_CONF_OPENSSL_NO_TLSEXT
#endif
+#ifdef OPENSSL_NO_SOCK
+RUST_CONF_OPENSSL_NO_SOCK
+#endif
+
#ifdef OPENSSL_NO_STDIO
RUST_CONF_OPENSSL_NO_STDIO
#endif
diff --git a/vendor/openssl-sys/build/find_normal.rs b/vendor/openssl-sys/build/find_normal.rs
index 791fc3398..4d461039c 100644
--- a/vendor/openssl-sys/build/find_normal.rs
+++ b/vendor/openssl-sys/build/find_normal.rs
@@ -92,8 +92,8 @@ fn find_openssl_dir(target: &str) -> OsString {
try_pkg_config();
try_vcpkg();
- // FreeBSD ships with OpenSSL but doesn't include a pkg-config file :(
- if host == target && target.contains("freebsd") {
+ // FreeBSD and OpenBSD ship with Libre|OpenSSL but don't include a pkg-config file
+ if host == target && (target.contains("freebsd") || target.contains("openbsd")) {
return OsString::from("/usr");
}
@@ -198,13 +198,11 @@ fn try_pkg_config() {
let target = env::var("TARGET").unwrap();
let host = env::var("HOST").unwrap();
- // If we're going to windows-gnu we can use pkg-config, but only so long as
- // we're coming from a windows host.
- //
- // Otherwise if we're going to windows we probably can't use pkg-config.
+ // FIXME we really shouldn't be automatically enabling this
if target.contains("windows-gnu") && host.contains("windows") {
env::set_var("PKG_CONFIG_ALLOW_CROSS", "1");
- } else if target.contains("windows") {
+ } else if target.contains("windows-msvc") {
+ // MSVC targets use vcpkg instead.
return;
}
@@ -232,8 +230,12 @@ fn try_pkg_config() {
///
/// Note that if this succeeds then the function does not return as vcpkg
/// should emit all of the cargo metadata that we need.
-#[cfg(target_env = "msvc")]
fn try_vcpkg() {
+ let target = env::var("TARGET").unwrap();
+ if !target.contains("windows") {
+ return;
+ }
+
// vcpkg will not emit any metadata if it can not find libraries
// appropriate for the target triple with the desired linkage.
@@ -257,9 +259,6 @@ fn try_vcpkg() {
process::exit(0);
}
-#[cfg(not(target_env = "msvc"))]
-fn try_vcpkg() {}
-
fn execute_command_and_get_output(cmd: &str, args: &[&str]) -> Option<String> {
let out = Command::new(cmd).args(args).output();
if let Ok(ref r1) = out {
diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
index 3359165a3..21ccf3d03 100644
--- a/vendor/openssl-sys/build/main.rs
+++ b/vendor/openssl-sys/build/main.rs
@@ -4,7 +4,6 @@ extern crate cc;
#[cfg(feature = "vendored")]
extern crate openssl_src;
extern crate pkg_config;
-#[cfg(target_env = "msvc")]
extern crate vcpkg;
use std::collections::HashSet;
diff --git a/vendor/openssl-sys/build/run_bindgen.rs b/vendor/openssl-sys/build/run_bindgen.rs
index 5d307503f..1eeaad225 100644
--- a/vendor/openssl-sys/build/run_bindgen.rs
+++ b/vendor/openssl-sys/build/run_bindgen.rs
@@ -55,6 +55,10 @@ const INCLUDES: &str = "
#if OPENSSL_VERSION_NUMBER >= 0x30000000
#include <openssl/provider.h>
#endif
+
+#if defined(LIBRESSL_VERSION_NUMBER) || defined(OPENSSL_IS_BORINGSSL)
+#include <openssl/poly1305.h>
+#endif
";
#[cfg(feature = "bindgen")]