Skip to content

Commit bdab67e

Browse files
authored
gh-112301: Add fortify source level 3 to default compiler options (gh-121520)
1 parent 94e6644 commit bdab67e

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Enable runtime protections for glibc to abort execution when unsafe behavior is encountered,
2+
for all platforms except Windows.

configure

+39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+1
Original file line numberDiff line numberDiff line change
@@ -2460,6 +2460,7 @@ AS_VAR_IF([with_strict_overflow], [yes],
24602460
# These flags should be enabled by default for all builds.
24612461
AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [BASECFLAGS="$BASECFLAGS -fstack-protector-strong"], [AC_MSG_WARN([-fstack-protector-strong not supported])], [-Werror])
24622462
AX_CHECK_COMPILE_FLAG([-Wtrampolines], [BASECFLAGS="$BASECFLAGS -Wtrampolines"], [AC_MSG_WARN([-Wtrampolines not supported])], [-Werror])
2463+
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])])
24632464

24642465
case $GCC in
24652466
yes)

0 commit comments

Comments
 (0)