diff options
author | Felix Bünemann <Felix.Buenemann@gmail.com> | 2020-12-23 08:46:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-23 09:46:23 +0200 |
commit | b51f5da31446a56f6e83e021f4f44fb472999c7c (patch) | |
tree | 1b1347d26f67761d486b70f5ea39ce322b0aea57 /src/Makefile | |
parent | 781d7b0d9b51d1d80097c1f6ddec6270c1532ede (diff) | |
download | redis-b51f5da31446a56f6e83e021f4f44fb472999c7c.tar.gz |
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.
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile index 32cedbac5..068dbc9da 100644 --- a/src/Makefile +++ b/src/Makefile @@ -115,8 +115,18 @@ else ifeq ($(uname_S),Darwin) # Darwin 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_LDFLAGS=-L/usr/local/opt/openssl/lib +endif else ifeq ($(uname_S),AIX) # AIX |