mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Merge pull request #1418 from fanquake/use_fortify_source_3
build: use FORTIFY_SOURCE=3 in hardening option
This commit is contained in:
commit
bcefdbc67a
@ -341,7 +341,7 @@ if (${GNUC})
|
|||||||
-Wstack-protector
|
-Wstack-protector
|
||||||
"--param ssp-buffer-size=1")
|
"--param ssp-buffer-size=1")
|
||||||
|
|
||||||
add_definitions(-D_FORTIFY_SOURCE=2)
|
add_definitions(-D_FORTIFY_SOURCE=3)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (EVENT__ENABLE_GCC_FUNCTION_SECTIONS)
|
if (EVENT__ENABLE_GCC_FUNCTION_SECTIONS)
|
||||||
|
@ -42,7 +42,7 @@ AC_ARG_ENABLE([gcc-warnings],
|
|||||||
AC_ARG_ENABLE([gcc-hardening],
|
AC_ARG_ENABLE([gcc-hardening],
|
||||||
AS_HELP_STRING([--enable-gcc-hardening, enable compiler security checks]),
|
AS_HELP_STRING([--enable-gcc-hardening, enable compiler security checks]),
|
||||||
[if test "$enableval" = "yes"; then
|
[if test "$enableval" = "yes"; then
|
||||||
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
|
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=3 -fstack-protector-all"
|
||||||
CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
|
CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
|
||||||
CFLAGS="$CFLAGS --param ssp-buffer-size=1"
|
CFLAGS="$CFLAGS --param ssp-buffer-size=1"
|
||||||
fi])
|
fi])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user