Page MenuHomePhabricator

configure: Use CFLAGS_FOR_BUILD when checking native compiler

Authored by deadalnix on Jan 17 2020, 13:06.



This fixes a bug where configure would fail or disable static
ecmult tables because it wrongly checks the native compiler using
the target CFLAGS (instead of the native CFLAGS_FOR_BUILD), and
similar for CPPFLAGS and LDFLAGS.

Moreover, this commit adds tests to figure out whether the native
compiler supports the warning flags passed during the build, and it
contains a few minor improvements to the code that checks the native

  • Actually pass CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD to linker

This is a backport of secp256k1 PR584

It does not look like any change is required on the cmake build because it build the native eecutable in a different context altogether.

Test Plan
make check

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Jan 17 2020, 13:06
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 17 2020, 13:06
Fabien accepted this revision.Jan 17 2020, 15:24
This revision is now accepted and ready to land.Jan 17 2020, 15:24