Page MenuHomePhabricator

[secp256k1] build: Prebuild and distribute ecmult_gen table
ClosedPublic

Authored by PiRK on Jan 19 2026, 10:19.

Details

Summary
  • Improve Makefile.am for both prebuilt tables files
  • On the way, tidy EXTRA_DIST: Move the header files to noinst_HEADERS, where they conceptually belong, and add missing SECURITY.md to EXTRA_DIST

This is a partial backport of secp256k1#988 and core#1047
https://github.com/bitcoin-core/secp256k1/pull/988/commits/ad63bb4c296e6007dab22cda05fd599b20139362
https://github.com/bitcoin-core/secp256k1/pull/988/commits/d94a37a20c3b5b44f1bcf60d309ffc50727e18e4
https://github.com/bitcoin-core/secp256k1/pull/1047/commits/26a022a3a0e3fceb1cd2e882e1476c950cabc2e8
Depends on D19399

Test Plan

Delete either one of ecmult_gen_static_prec_table.h and ecmult_static_pre_g.h, or both, or none of them, and make sure the cmake build works (and only the deleted header is regenerated in the build dir):

(( RANDOM % 2 == 0 )) && rm -f ../src/secp256k1/src/ecmult_gen_static_prec_table.h && echo "Deleted!" || echo "Survived"
(( RANDOM % 2 == 0 )) && rm -f ../src/secp256k1/src/ecmult_static_pre_g.h && echo "Deleted!" || echo "Survived"
cmake .. -GNinja
ninja secp256k1 check-secp256k1
git stash   # restore deleted headers

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK retitled this revision from build: Prebuild and distribute ecmult_gen table to [secp256k1] build: Prebuild and distribute ecmult_gen table.Jan 19 2026, 10:24
This revision is now accepted and ready to land.Jan 19 2026, 13:59