Skip to content

Commit d8f8243

Browse files
authored
gh-121026: Include -Werror with new compiler flag checks to ensure compatibility (gh-121030)
1 parent 0654336 commit d8f8243

File tree

2 files changed

+25
-33
lines changed

2 files changed

+25
-33
lines changed

configure

Lines changed: 22 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2453,13 +2453,9 @@ AS_VAR_IF([with_strict_overflow], [yes],
24532453

24542454
# Enable flags that warn and protect for potential security vulnerabilities.
24552455
# These flags should be enabled by default for all builds.
2456-
AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough], [BASECFLAGS="$BASECFLAGS -Wimplicit-fallthrough"], [AC_MSG_WARN([-Wimplicit-fallthrough not supported])])
2457-
AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [BASECFLAGS="$BASECFLAGS -fstack-protector-strong"], [AC_MSG_WARN([-fstack-protector-strong not supported])])
2458-
case $CC in
2459-
*gcc*)
2460-
# Add GCC-specific compiler flags
2461-
AX_CHECK_COMPILE_FLAG([-Wtrampolines], [BASECFLAGS="$BASECFLAGS -Wtrampolines"], [AC_MSG_WARN([-Wtrampolines not supported])])
2462-
esac
2456+
AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough], [BASECFLAGS="$BASECFLAGS -Wimplicit-fallthrough"], [AC_MSG_WARN([-Wimplicit-fallthrough not supported])], [-Werror])
2457+
AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [BASECFLAGS="$BASECFLAGS -fstack-protector-strong"], [AC_MSG_WARN([-fstack-protector-strong not supported])], [-Werror])
2458+
AX_CHECK_COMPILE_FLAG([-Wtrampolines], [BASECFLAGS="$BASECFLAGS -Wtrampolines"], [AC_MSG_WARN([-Wtrampolines not supported])], [-Werror])
24632459

24642460
case $GCC in
24652461
yes)

0 commit comments

Comments
 (0)