Skip to content

Commit 0be2137

Browse files
committed
more fix
1 parent 67814bb commit 0be2137

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

scripts/darwin/setup_vendors.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,22 @@ if [ ! -f "build/ssl/libssl.a" ] && [ ! -f "build/libssl.a" ]; then
5151
mkdir -p build
5252
cd build
5353

54-
# macOS uses Clang - no special flags needed
55-
cmake -DCMAKE_BUILD_TYPE=Release \
56-
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
57-
..
54+
# Detect architecture
55+
ARCH=$(uname -m)
56+
57+
# macOS uses Clang
58+
# On ARM64, we need to explicitly set the architecture to avoid x86_64 assembly issues
59+
if [ "$ARCH" = "arm64" ]; then
60+
cmake -DCMAKE_BUILD_TYPE=Release \
61+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
62+
-DCMAKE_OSX_ARCHITECTURES=arm64 \
63+
..
64+
else
65+
cmake -DCMAKE_BUILD_TYPE=Release \
66+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
67+
..
68+
fi
69+
5870
make -j$(sysctl -n hw.ncpu)
5971

6072
echo "✓ BoringSSL built successfully"

scripts/linux/setup_vendors.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ if [ ! -f "build/libssl.a" ]; then
5656
CMAKE_C_FLAGS="-Wno-maybe-uninitialized"
5757
CMAKE_CXX_FLAGS="-Wno-maybe-uninitialized"
5858

59+
# Explicitly set system name to Linux to prevent cross-platform confusion
5960
cmake -DCMAKE_BUILD_TYPE=Release \
6061
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
62+
-DCMAKE_SYSTEM_NAME=Linux \
6163
-DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" \
6264
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
6365
..

0 commit comments

Comments
 (0)