File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 93
93
AC_DEFUN ( [ SECP_TRY_APPEND_DEFAULT_CFLAGS] , [
94
94
# GCC and compatible (incl. clang)
95
95
if test "x$GCC" = "xyes"; then
96
- # Try to append -Werror=unknown-warning-option to CFLAGS temporarily. Otherwise clang will
97
- # not error out if it gets unknown warning flags and the checks here will always succeed
98
- # no matter if clang knows the flag or not.
96
+ # Try to append -Werror to CFLAGS temporarily. Otherwise checks for some unsupported
97
+ # flags will succeed.
98
+ # Note that failure to append -Werror does not necessarily mean that -Werror is not
99
+ # supported. The compiler may already be warning about something unrelated, for example
100
+ # about some path issue. If that is the case, -Werror cannot be used because all
101
+ # of those warnings would be turned into errors.
99
102
SECP_TRY_APPEND_DEFAULT_CFLAGS_saved_CFLAGS="$CFLAGS"
100
- SECP_TRY_APPEND_CFLAGS([ -Werror=unknown-warning-option ] , CFLAGS)
103
+ SECP_TRY_APPEND_CFLAGS([ -Werror] , CFLAGS)
101
104
102
105
SECP_TRY_APPEND_CFLAGS([ -std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef] , $1 ) # GCC >= 3.0, -Wlong-long is implied by -pedantic.
103
106
SECP_TRY_APPEND_CFLAGS([ -Wno-overlength-strings] , $1 ) # GCC >= 4.2, -Woverlength-strings is implied by -pedantic.
You can’t perform that action at this time.
0 commit comments