Skip to content

Commit 686fa5d

Browse files
committed
build: Improve SECP_TRY_APPEND_DEFAULT_CFLAGS macro
1 parent 427bc3c commit 686fa5d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

configure.ac

+3-4
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,10 @@ esac
8888
AC_DEFUN([SECP_TRY_APPEND_DEFAULT_CFLAGS], [
8989
# GCC and compatible (incl. clang)
9090
if test "x$GCC" = "xyes"; then
91-
# Try to append -Werror=unknown-warning-option to CFLAGS temporarily. Otherwise clang will
92-
# not error out if it gets unknown warning flags and the checks here will always succeed
93-
# no matter if clang knows the flag or not.
91+
# Try to append -Werror to CFLAGS temporarily. Otherwise
92+
# checks for some unsupported flags will succeed.
9493
SECP_TRY_APPEND_DEFAULT_CFLAGS_saved_CFLAGS="$CFLAGS"
95-
SECP_TRY_APPEND_CFLAGS([-Werror=unknown-warning-option], CFLAGS)
94+
SECP_TRY_APPEND_CFLAGS([-Werror], CFLAGS)
9695
9796
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.
9897
SECP_TRY_APPEND_CFLAGS([-Wno-overlength-strings], $1) # GCC >= 4.2, -Woverlength-strings is implied by -pedantic.

0 commit comments

Comments
 (0)