Skip to content

Commit 24cc1dd

Browse files
committed
fix openssl min os
1 parent bc0ac6d commit 24cc1dd

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

.github/workflows/onestep.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export HOMEBREW_NO_AUTO_UPDATE=1
1919
export RELEASE_DATE=$(TZ=UTC-8 date +'%y%m%d%H%M%S')
2020
export RELEASE_VERSION=$(grep GIT_REPO_VERSION= ./configs/libs/${LIB_NAME}.sh | tail -n 1 | awk -F = '{printf "%s",$2}')
2121
export TAG=${LIB_NAME}-${RELEASE_VERSION}-${RELEASE_DATE}
22-
export TITLE="👏👏${LIB_NAME}-${RELEASE_VERSION}"
22+
export TITLE="👏👏${LIB_NAME}-${PLAT}-${RELEASE_VERSION}"
2323

2424
ROOT_DIR=$PWD
2525
DIST_DIR=$ROOT_DIR/build/dist

do-compile/apple/openssl.sh

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,22 @@ set -e
2424
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
2525
cd "$THIS_DIR"
2626

27-
if [ "$MR_ARCH" = "x86_64" ]; then
28-
compiler="darwin64-x86_64-cc"
29-
elif [ "$MR_ARCH" = "arm64" ]; then
30-
compiler="darwin64-arm64-cc"
27+
28+
export CROSS_TOP="$XCRUN_SDK_PLATFORM_PATH/Developer"
29+
export CROSS_SDK=$(basename "$MR_SYS_ROOT")
30+
31+
if [[ "$MR_PLAT" == "ios" || "$MR_PLAT" == "tvos" ]]; then
32+
compiler="iphoneos-cross"
3133
else
32-
echo "unknown architecture $FF_ARCH";
33-
exit 1
34+
if [[ "$MR_ARCH" == "x86_64" ]]; then
35+
compiler="darwin64-x86_64-cc"
36+
else
37+
compiler="darwin64-arm64-cc"
38+
fi
3439
fi
3540

41+
echo "CROSS_TOP:$CROSS_TOP"
42+
echo "CROSS_SDK:$CROSS_SDK"
3643
# no-hw no-asm
3744

3845
CFG_FLAGS="no-shared no-engine no-dynamic-engine no-static-engine \
@@ -51,11 +58,11 @@ CFG_FLAGS="$CFG_FLAGS $compiler"
5158
C_FLAGS="$MR_DEFAULT_CFLAGS"
5259

5360
# for cross compile
54-
if [[ $(uname -m) != "$MR_ARCH" || "$MR_FORCE_CROSS" ]];then
55-
echo "[*] cross compile, on $(uname -m) compile $MR_PLAT $MR_ARCH."
56-
# https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html
57-
CFLAGS="$CFLAGS -isysroot $MR_SYS_ROOT"
58-
fi
61+
# if [[ $(uname -m) != "$MR_ARCH" || "$MR_FORCE_CROSS" ]];then
62+
# echo "[*] cross compile, on $(uname -m) compile $MR_PLAT $MR_ARCH."
63+
# # https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html
64+
# CFLAGS="$CFLAGS -isysroot $MR_SYS_ROOT"
65+
# fi
5966

6067
cd $MR_BUILD_SOURCE
6168
if [ -f "./Makefile" ]; then
@@ -69,9 +76,11 @@ else
6976
echo "Openssl CFG: $CFG_FLAGS"
7077
echo "----------------------"
7178

72-
export C_FLAGS="$C_FLAGS"
73-
export CXXFLAG="$C_FLAGS"
79+
export CFLAGS="$C_FLAGS"
80+
export CXXFLAGS="$C_FLAGS"
81+
export LDFLAGS="$C_FLAGS"
7482
export CC="$MR_CC"
83+
7584
./Configure $CFG_FLAGS
7685
fi
7786

tools/export-apple-build-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export MR_CC="xcrun -sdk $XCRUN_SDK clang"
8383
export MR_CXX="xcrun -sdk $XCRUN_SDK clang++"
8484
# xcrun -sdk macosx --show-sdk-platform-path
8585
# /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
86-
# export XCRUN_SDK_PLATFORM_PATH=`xcrun -sdk $XCRUN_SDK --show-sdk-platform-path`
86+
export XCRUN_SDK_PLATFORM_PATH=`xcrun -sdk $XCRUN_SDK --show-sdk-platform-path`
8787
# xcrun -sdk macosx --show-sdk-path
8888
# /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk
8989
export MR_SYS_ROOT=`xcrun -sdk $XCRUN_SDK --show-sdk-path`

0 commit comments

Comments
 (0)