On master (e75f91eae3936269b40b4bfdfe540d5526270936) passing CXXFLAGS variable to the configure script causes the default -O2 optimization flag is not set in the AC_PROG_CXX macro:
If output variable
CXXFLAGSwas not already set, set it to-g -O2for the GNU C++ compiler (-O2on systems where G++ does not accept-g), or-gfor other compilers.
Such behavior leads to multiple warnings when compiling with clang 11.0 (on Fedora 33):
0/usr/include/features.h:397:4: warning: _FORTIFY_SOURCE requires compiling with optimization (-O) [-W#warnings]
1# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
2 ^
31 warning generated.
This PR ensures that -D_FORTIFY_SOURCE flag won’t cause such warnings.