gh-112301: Make fortify source option check -Werror - #122141
Conversation
|
If you want to test the option with build bot please move the option under the We can add |
5d075bc to
505016a
Compare
|
@corona10 I have pushed a commit to put |
| 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]) |
There was a problem hiding this comment.
cc @encukou
It will be moved to ./configure --enable-slower-safety after the buildbot is passed.
And maybe we can discuss about using CFLAGS_NODIST in this PR too.
|
|
||
| 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])]) |
There was a problem hiding this comment.
@nohlson you can remove whole code block for testing purpose.
There was a problem hiding this comment.
Removed. Ready to test with buildbots
|
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @corona10: please review the changes made to this pull request. |
also does not related to this PR. So the change itself looks fine. |
|
I have made the requested changes; please review again |
corona10
left a comment
There was a problem hiding this comment.
lgtm
Let's update BASECFLAGS into CFLAGS_NODIST with separate PR.

Add autoconf option to
AX_CHECK_COMPILE_FLAGinconfigure.acto treat checking for-D_FORTIFY_SOURCE=3compiler option availability with-Werrorto match other options.Suggested in previous PR for adding this option: #121520 (comment)