[secp256k1] build: Improve SECP_TRY_APPEND_DEFAULT_CFLAGS macro
Summary:
While the SECP_TRY_APPEND_DEFAULT_CFLAGS macro works with the current compiler flag set, it is not perfect.
For example, it will accept -fvisibility-inlines-hidden flag, which actually causes:
cc1: warning: command-line option ‘-fvisibility-inlines-hidden’ is valid for C++/ObjC++ but not for CThis PR improves robustness of the SECP_TRY_APPEND_DEFAULT_CFLAGS macro.
FWIW, the same approach is used in our CMake-based build system, and in Bitcoin Core.
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
This is a backport of secp256k1#1241
Test Plan:
build wit autotools
cd src/secp256k1 ./autogen.sh mkdir build && cd build ../configure make
Reviewers: #bitcoin_abc, bytesofman
Reviewed By: #bitcoin_abc, bytesofman
Differential Revision: https://reviews.bitcoinabc.org/D19847