8000 gh-112301: Make fortify source option check -Werror by nohlson · Pull Request #122141 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-112301: Make fortify source option check -Werror #122141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert test config
  • Loading branch information
nohlson committed Jul 24, 2024
commit 46404d8d236f2bd98b0e933f7b9dd0c0af78da35
26 changes: 15 additions & 11 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion configure.ac
< 7AB4 /tr>
Original file line number Diff line number Diff line change
Expand Up @@ -2510,14 +2510,18 @@ if test "$disable_safety" = "no"
then
AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [BASECFLAGS="$BASECFLAGS -fstack-protector-strong"], [AC_MSG_WARN([-fstack-protector-strong not supported])], [-Werror])
AX_CHECK_COMPILE_FLAG([-Wtrampolines], [BASECFLAGS="$BASECFLAGS -Wtrampolines"], [AC_MSG_WARN([-Wtrampolines not supported])], [-Werror])
AX_CHECK_COMPILE_FLAG([-D_FORTIFY_SOURCE=3], [BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"], [AC_MSG_WARN([-D_FORTIFY_SOURCE=3 not supported])], [-Werror])
fi

AC_MSG_CHECKING([for --enable-slower-safety])
AC_ARG_ENABLE([slower-safety],
[AS_HELP_STRING([--enable-slower-safety], [enable usage of the security compiler options with performance overhead])],[])
AC_MSG_RESULT([$enable_slower_safety])

if test "$enable_slower_safety" = "yes"
then
AX_CHECK_COMPILE_FLAG([-D_FORTIFY_SOURCE=3], [BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"], [AC_MSG_WARN([-D_FORTIFY_SOURCE=3 not supported])], [-Werror])
fi

case $GCC in
yes)
CFLAGS_NODIST="$CFLAGS_NODIST -std=c11"
Expand Down
Loading
0