Skip to content

Commit 535a67b

Browse files
committed
Link OpenSSL statically on OSX
Now that Cargo requires OpenSSL >= 1.0.1 transitively through the `openssl-sys` 0.9 release the dynamic libraries for OpenSSL are no longer located on OSX by default. This means that the support necessary for libssh2 needs to be statically linked rather than dynamically linked. Closes #3303
1 parent d1bfc01 commit 535a67b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,12 @@ OPENSSL_CFLAGS_i686-unknown-linux-gnu := -m32
232232
OPENSSL_CFLAGS_i686-unknown-linux-musl := -m32
233233

234234
define BUILD_OPENSSL
235+
236+
ifdef CFG_ENABLE_NIGHTLY
237+
cargo-$(1): export OPENSSL_STATIC := 1
238+
test-unit-$(1): export OPENSSL_STATIC := 1
239+
endif
240+
235241
ifdef OPENSSL_OS_$(1)
236242
ifdef CFG_ENABLE_NIGHTLY
237243
OPENSSL_INSTALL_$(1) := $$(CFG_BUILD_DIR)/target/openssl/$(1)-install
@@ -250,9 +256,7 @@ target/openssl/$(1).stamp: target/openssl/openssl-$$(OPENSSL_VERS).tar.gz \
250256
touch $$@
251257

252258
# variables read by various build scripts to find openssl
253-
cargo-$(1): export OPENSSL_STATIC := 1
254259
cargo-$(1): export OPENSSL_DIR := $$(OPENSSL_INSTALL_$(1))
255-
test-unit-$(1): export OPENSSL_STATIC := 1
256260
test-unit-$(1): export OPENSSL_DIR := $$(OPENSSL_INSTALL_$(1))
257261

258262
# build libz statically into the cargo we're producing

0 commit comments

Comments
 (0)