Skip to content

Commit 678e63f

Browse files
arman-bdclaude
andcommitted
fix: disable assembly in BoringSSL on Linux to avoid platform detection issues
Changed approach from deleting files to disabling assembly entirely using -DOPENSSL_NO_ASM=1. This is the same solution that worked for macOS ARM64 builds. The previous approach of deleting Apple assembly files failed because CMake's sources.cmake still referenced them, causing configuration errors. Using -DOPENSSL_NO_ASM=1: - Bypasses platform detection issues entirely - Uses pure C implementations instead of assembly - Slightly slower but guaranteed to work - Same approach successfully used on macOS ARM64 This trades a small performance penalty for build reliability. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 21b7bab commit 678e63f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/linux/setup_vendors.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,16 @@ if [ ! -f "build/libssl.a" ]; then
7474
unset CMAKE_OSX_SYSROOT
7575
unset APPLE
7676

77-
# Workaround: Remove Apple-specific assembly files that shouldn't be built on Linux
78-
# BoringSSL's CMake sometimes incorrectly tries to build these on Linux
79-
echo "Removing Apple-specific assembly files..."
80-
find ../gen/bcm -name "*-apple.S" -delete || true
77+
# Workaround: Disable assembly optimizations to avoid platform detection issues
78+
# BoringSSL's CMake is incorrectly trying to use Apple assembly files on Linux
79+
# Using -DOPENSSL_NO_ASM=1 forces pure C implementations instead
80+
echo "Building BoringSSL with assembly disabled to avoid platform detection issues..."
8181

8282
cmake -DCMAKE_BUILD_TYPE=Release \
8383
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
8484
-DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" \
8585
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
86+
-DOPENSSL_NO_ASM=1 \
8687
..
8788
make -j$(nproc)
8889

0 commit comments

Comments
 (0)