From df3120ecb2cbd14431f2deb8e5fd7ca758b81061 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 6 Aug 2026 15:15:58 -0700 Subject: [PATCH] cmake: don't disable _FORTIFY_SOURCE This was inherited from libaom, which inherited it from libvpx, where it was added long ago as an attempt for compatibility across glibc versions. Formalizing it in the build was never a great idea as this provides some security benefits. Projects like Gentoo have removed this from the build flags for some time. CFLAGS/AVM_EXTRA_C_FLAGS can still be used to set these values if needed. This matches the changes in libvpx and libaom: 368c5f89d configure: don't disable _FORTIFY_SOURCE ec0dedc1a2 cmake: don't disable _FORTIFY_SOURCE --- cmake/avm_configure.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmake/avm_configure.cmake b/cmake/avm_configure.cmake index efd23634f5..ec567cb7a1 100644 --- a/cmake/avm_configure.cmake +++ b/cmake/avm_configure.cmake @@ -348,9 +348,6 @@ else() add_compiler_flag_if_supported("-UNDEBUG") endif() - if("${build_type_lowercase}" MATCHES "rel") - add_compiler_flag_if_supported("-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0") - endif() add_compiler_flag_if_supported("-D_LARGEFILE_SOURCE") add_compiler_flag_if_supported("-D_FILE_OFFSET_BITS=64") endif()