Skip to content

fix(build): include fiat ADX assembly in Apple x86_64 sources - #448

Open
DavidClaudeAI wants to merge 1 commit into
google:masterfrom
DavidClaudeAI:fix/apple-x86_64-fiat-asm-upstream
Open

DavidClaudeAI wants to merge 1 commit into
google:masterfrom
DavidClaudeAI:fix/apple-x86_64-fiat-asm-upstream

Conversation

@DavidClaudeAI

Copy link
Copy Markdown

Fixes #446

The four third_party/fiat/asm/*.S files are only listed in crypto_sources_linux_x86_64. They are guarded for both ELF and Mach-O, and the C code references fiat_p256_adx_mul / fiat_p256_adx_sqr whenever OPENSSL_X86_64 is defined without OPENSSL_NO_ASM. So linking the x86_64 slice on macOS fails (Undefined symbols _fiat_p256_adx_mul, _fiat_p256_adx_sqr). This shows up with a universal flutter build macos --release; arm64 does not use these routines.

Changes:

  • sources.cmake: add the four fiat ADX files to crypto_sources_apple_x86_64.
  • tool/bump-boringssl-revision.sh: also emit them for apple_x86_64, so the next revision bump keeps them.
    (poly_rq_mul.S stays Linux-only: its own guard requires OPENSSL_LINUX.)

Tested on an Apple Silicon Mac (Flutter 3.47.1): the universal macOS build now links; lipo -info shows x86_64 arm64; the x86_64 slice under Rosetta decrypts an AES-256-GCM vector produced by Node's crypto, rejects a tampered tag, and round-trips 48 MB.

@google-cla

google-cla Bot commented Oct 18, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

The fiat ADX assembly files are guarded for both ELF and Mach-O and are
referenced from C (fiat_p256_adx_mul / fiat_p256_adx_sqr) whenever
OPENSSL_X86_64 is defined without OPENSSL_NO_ASM. They were only listed
in crypto_sources_linux_x86_64, so linking the x86_64 slice on macOS
failed with undefined symbols _fiat_p256_adx_mul and _fiat_p256_adx_sqr
(e.g. a universal flutter build macos).

Add them to crypto_sources_apple_x86_64, and teach
tool/bump-boringssl-revision.sh to keep them there.

Refs google#446
@DavidClaudeAI
DavidClaudeAI force-pushed the fix/apple-x86_64-fiat-asm-upstream branch from 10d0e95 to e50fcce Compare October 19, 2026 15:04

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: macOS x86_64 build fails: fiat_p256_adx_* assembly missing from crypto_sources_apple_x86_64

1 participant