Skip to content

Commit

Permalink
Update to build OpenSSL 3.x #72
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonacox committed Nov 10, 2024
1 parent 2da2146 commit 2d5e8df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions openssl/openssl-build-phase1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ buildCatalyst()
ARCH=$1

# disabe bitcode for openssl 3
if [[ "$OPENSSL_VERSION" = "openssl-3.0"* ]]; then
if [[ "$OPENSSL_VERSION" = "openssl-3"* ]]; then
CC_BITCODE_FLAG=""
else
CC_BITCODE_FLAG="-fembed-bitcode"
Expand Down Expand Up @@ -312,7 +312,7 @@ buildTVOS()
LANG=C sed -i -- 's/fork()/-1/' "./test/drbgtest.c"
LANG=C sed -i -- 's/!defined(OPENSSL_NO_ASYNC)/defined(HAVE_FORK)/' "./crypto/async/arch/async_posix.h"
fi
if [[ "$OPENSSL_VERSION" = "openssl-3.0"* ]]; then
if [[ "$OPENSSL_VERSION" = "openssl-3"* ]]; then
# LANG=C sed -i -- 's/!defined(OPENSSL_NO_POSIX_IO)/defined(HAVE_FORK)/' "./apps/ocsp.c"
LANG=C sed -i -- 's/fork()/-1/' "./apps/speed.c"
LANG=C sed -i -- 's/fork()/-1/' "./apps/lib/http_server.c"
Expand Down Expand Up @@ -393,7 +393,7 @@ buildTVOSsim()
LANG=C sed -i -- 's/fork()/-1/' "./test/drbgtest.c"
LANG=C sed -i -- 's/!defined(OPENSSL_NO_ASYNC)/defined(HAVE_FORK)/' "./crypto/async/arch/async_posix.h"
fi
if [[ "$OPENSSL_VERSION" = "openssl-3.0"* ]]; then
if [[ "$OPENSSL_VERSION" = "openssl-3"* ]]; then
# LANG=C sed -i -- 's/!defined(OPENSSL_NO_POSIX_IO)/defined(HAVE_FORK)/' "./apps/ocsp.c"
LANG=C sed -i -- 's/fork()/-1/' "./apps/speed.c"
LANG=C sed -i -- 's/fork()/-1/' "./apps/lib/http_server.c"
Expand Down
4 changes: 2 additions & 2 deletions openssl/openssl-build-phase2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ buildIOS()
export BUILD_TOOLS="${DEVELOPER}"
ADDCFLAG=""
DSO_LDFLAGS="DSO_LDFLAGS=-fembed-bitcode"
if [[ "$OPENSSL_VERSION" = "openssl-3.0"* ]]; then
if [[ "$OPENSSL_VERSION" = "openssl-3"* ]]; then
# disable bitcode for openssl 3
export CC="${BUILD_TOOLS}/usr/bin/gcc -arch ${ARCH}"
DSO_LDFLAGS=""
Expand Down Expand Up @@ -220,7 +220,7 @@ buildIOSsim()
fi

# set up exports for build
if [[ "$OPENSSL_VERSION" = "openssl-3.0"* ]]; then
if [[ "$OPENSSL_VERSION" = "openssl-3"* ]]; then
if [[ "${ARCH}" == "armv7" || "${ARCH}" == "armv7s" || "${ARCH}" == "i386" ]]; then
# armv7 and i386 doesn't work with atomic
export CFLAGS=" -Os -miphoneos-version-min=${MIPHONEOS} -DBROKEN_CLANG_ATOMICS -arch ${ARCH} ${RUNTARGET} "
Expand Down

0 comments on commit 2d5e8df

Please sign in to comment.