From 764b09144e61c9759f2ef38c6ed9c04ef6bf4b5a Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 12 Mar 2025 07:35:40 -0700 Subject: _FORTIFY_SOURCE=3 for the host. musl has no fortify, and our ancient glibc only has level 2, but this is meaningful for bionic, and consistency of compiler flags seems like the least worst option. Bug: http://b/291762537 Change-Id: I779d64096cd089475e058b05ed01892bf72ccedb --- cc/config/x86_linux_bionic_host.go | 2 +- cc/config/x86_linux_host.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cc') diff --git a/cc/config/x86_linux_bionic_host.go b/cc/config/x86_linux_bionic_host.go index ddc86c299..d2f88ef34 100644 --- a/cc/config/x86_linux_bionic_host.go +++ b/cc/config/x86_linux_bionic_host.go @@ -28,7 +28,7 @@ var ( "-fno-omit-frame-pointer", "-U_FORTIFY_SOURCE", - "-D_FORTIFY_SOURCE=2", + "-D_FORTIFY_SOURCE=3", "-fstack-protector-strong", // From x86_64_device diff --git a/cc/config/x86_linux_host.go b/cc/config/x86_linux_host.go index c070050b7..c3f25aa21 100644 --- a/cc/config/x86_linux_host.go +++ b/cc/config/x86_linux_host.go @@ -29,7 +29,7 @@ var ( "-fno-omit-frame-pointer", "-U_FORTIFY_SOURCE", - "-D_FORTIFY_SOURCE=2", + "-D_FORTIFY_SOURCE=3", "-fstack-protector", "--gcc-toolchain=${LinuxGccRoot}", -- cgit v1.2.3-59-g8ed1b