Page MenuHomePhabricator

configure: Use CFLAGS_FOR_BUILD when checking native compiler
ClosedPublic

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

Details

Summary

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
compiler.

  • 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

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