Skip to content

Commit

Permalink
Unify configuration for OpenSSL.
Browse files Browse the repository at this point in the history
MacOS isn't special and can properly build with the same arguments as the
"normal" build path.
While we are at it, go ahead and use Configure, which is the documented way to
invoke the OpenSSL build system (./config just calls Configure).

Tested on:	MacOS (arm64), FreeBSD (amd64, arm64), Ubuntu (aarch64)
  • Loading branch information
tetlowgm committed Jun 21, 2024
1 parent 2a499df commit a139620
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,8 @@ opensslpull:
git clone --depth 1 -b `git ls-remote https://github.com/openssl/openssl | grep -Eo '(openssl-3\.0\.[0-9]+)' | sort -V | tail -n 1` https://github.com/openssl/openssl ./openssl && cd ./openssl && touch ../.openssl.is.fresh ; \
fi

# Need to build OpenSSL differently on OSX
ifeq ($(OS), Darwin)
ifeq ($(ARCH), arm64)
OSSL_TARGET=darwin64-arm64-cc
else
OSSL_TARGET=darwin64-x86_64-cc
endif
openssl/Makefile: .openssl.is.fresh
cd ./openssl; ./Configure -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIC enable-weak-ssl-ciphers zlib $(OSSL_TARGET)
# Any other *NIX platform
else
openssl/Makefile: .openssl.is.fresh
cd ./openssl; ./config -v -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIC no-shared enable-weak-ssl-ciphers zlib
endif
cd ./openssl; ./Configure -v -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIC no-shared enable-weak-ssl-ciphers zlib

openssl/libcrypto.a: openssl/Makefile
$(MAKE) -j $(NUM_PROCS) -C openssl depend
Expand Down

0 comments on commit a139620

Please sign in to comment.