Skip to content

Commit

Permalink
Fix static build on macOS
Browse files Browse the repository at this point in the history
The build tag `openssl_static` does not produce a binary with
static linked libcrypto and libssl. The patch fixes it.

Related to tarantool/tt#308
  • Loading branch information
oleg-jukovec committed Jul 27, 2023
1 parent 75a230c commit 8ae136c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package openssl

// #cgo linux windows freebsd openbsd solaris pkg-config: libssl libcrypto
// #cgo linux freebsd openbsd solaris CFLAGS: -Wno-deprecated-declarations
// #cgo darwin CFLAGS: -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin LDFLAGS: -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto
// #cgo darwin CFLAGS: -I/usr/local/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin LDFLAGS: -L/usr/local/opt/openssl/lib -lssl -lcrypto
// #cgo windows CFLAGS: -DWIN32_LEAN_AND_MEAN
import "C"
4 changes: 2 additions & 2 deletions build_static.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package openssl

// #cgo linux windows freebsd openbsd solaris pkg-config: --static libssl libcrypto
// #cgo linux freebsd openbsd solaris CFLAGS: -Wno-deprecated-declarations
// #cgo darwin CFLAGS: -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin LDFLAGS: -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto
// #cgo darwin CFLAGS: -I/usr/local/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin LDFLAGS: /usr/local/opt/openssl/lib/libcrypto.a /usr/local/opt/openssl/lib/libssl.a
// #cgo windows CFLAGS: -DWIN32_LEAN_AND_MEAN
import "C"

0 comments on commit 8ae136c

Please sign in to comment.