Page MenuHomePhabricator

[SECP256K1] CMake: make the GMP bignum support optional
ClosedPublic

Authored by Fabien on Jan 28 2020, 20:01.

Diff Detail

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

Event Timeline

Fabien planned changes to this revision.Jan 28 2020, 21:19

Put BIGNUM=no at the right place, where there is no libgmp.

jasonbcox requested changes to this revision.Jan 28 2020, 23:22
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/secp256k1/travis/build_cmake.sh
8 ↗(On Diff #15856)

This change doesn't appear to be related and seems to increase code duplication. What's its purpose?

This revision now requires changes to proceed.Jan 28 2020, 23:22
Fabien requested review of this revision.Jan 29 2020, 06:55
Fabien added inline comments.
src/secp256k1/travis/build_cmake.sh
8 ↗(On Diff #15856)

What the toolchain file does is basically 2 things:

  1. Setting the -m32 flag
  2. Redirecting the library/header search path to the static dependencies (depends dir)

Since secp256k1 has no depends the second point makes no sense, and would prevent cmake from finding libgmp:i386 on the OS file system. Simply adding the -m32 flag is enough and solves the issue.

This revision is now accepted and ready to land.Jan 29 2020, 16:49