HomePhabricator

configure: Use CFLAGS_FOR_BUILD when checking native compiler

Authored by Tim Ruffing <crypto@timruffing.de> on Jan 16 2019, 16:12.

Description

configure: Use CFLAGS_FOR_BUILD when checking native compiler

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D4997

Details

Committed
deadalnixJan 17 2020, 16:15
Pushed
deadalnixJan 17 2020, 16:16
Reviewer
Restricted Project
Differential Revision
D4997: configure: Use CFLAGS_FOR_BUILD when checking native compiler
Parents
rABCbea9546d907e: Respect LDFLAGS and #undef STATIC_PRECOMPUTATION if using basic config
Branches
Unknown
Tags
Unknown