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:
0cc1: warning: command-line option ‘-fvisibility-inlines-hidden’ is valid for C++/ObjC++ but not for C
This 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.