Unverified Commit b51f5da3 authored by Felix Bünemann's avatar Felix Bünemann Committed by GitHub
Browse files

Fix TLS build on macOS arm64 systems (#8197)

Homebrew for darwin-arm64 uses /opt/homebrew instead of /usr/local as
the prefix, so that it can coexist with darwin-x86_64 using Rosetta 2.
parent 781d7b0d
...@@ -115,8 +115,18 @@ else ...@@ -115,8 +115,18 @@ else
ifeq ($(uname_S),Darwin) ifeq ($(uname_S),Darwin)
# Darwin # Darwin
FINAL_LIBS+= -ldl FINAL_LIBS+= -ldl
# Homebrew's OpenSSL is not linked to /usr/local to avoid
# conflicts with the system's LibreSSL installation so it
# must be referenced explicitly during build.
ifeq ($(uname_M),arm64)
# Homebrew arm64 uses /opt/homebrew as HOMEBREW_PREFIX
OPENSSL_CFLAGS=-I/opt/homebrew/opt/openssl/include
OPENSSL_LDFLAGS=-L/opt/homebrew/opt/openssl/lib
else
# Homebrew x86/ppc uses /usr/local as HOMEBREW_PREFIX
OPENSSL_CFLAGS=-I/usr/local/opt/openssl/include OPENSSL_CFLAGS=-I/usr/local/opt/openssl/include
OPENSSL_LDFLAGS=-L/usr/local/opt/openssl/lib OPENSSL_LDFLAGS=-L/usr/local/opt/openssl/lib
endif
else else
ifeq ($(uname_S),AIX) ifeq ($(uname_S),AIX)
# AIX # AIX
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment