Skip to content

Commit a238856

Browse files
committed
build: remove _FORTIFY_SOURCE
The vanilla glibc headers produce a warning when _FORTIFY_SOURCE is used without optimizations [1]. However Debian removes that warning when packaging glibc [2]. Hardening features should be manually enabled by users. [1]: https://sourceware.org/git/?p=glibc.git;f=include/features.h;h=glibc-2.42#l435 [2]: https://salsa.debian.org/glibc-team/glibc/-/blob/sid/debian/patches/any/local-revert-bz13979.diff Origin: #30
1 parent 3a91f01 commit a238856

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ if(CC_HAVE_WNO_STRINGOP_OVERFLOW)
112112
add_compile_options(-Wno-stringop-overflow)
113113
endif()
114114

115-
# Ask to glibc to check buffer overflows in memcpy() and friends.
116-
add_compile_definitions(_FORTIFY_SOURCE=3)
117-
118115
# In come case, backtraces are not available without that flags. Increase size
119116
# of the binary file, but can be stripped.
120117
if(CC_HAVE_UNWIND_TABLES)

0 commit comments

Comments
 (0)