From: Daniel Micay Date: Wed, 26 Dec 2018 10:20:24 -0500 Subject: Switch to -fstack-protector-strong This compiler option is already used for ChromeOS, but not yet on other platforms because there is push back against enabling an option resulting in ~1-2% lower performance and ~2-3% larger binaries. The size increase on Android is something they care a lot about since some devices have very little storage space. That also means ever so slightly higher memory/cache usage but not by the full 2-3%. Original License: MIT - https://spdx.org/licenses/MIT.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- build/config/compiler/BUILD.gn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -372,14 +372,12 @@ config("compiler") { cflags += [ "-fstack-protector" ] } } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) { - # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it. - # See also https://crbug.com/533294 # The x86 toolchain currently has problems with stack-protector. if (is_android && current_cpu == "x86") { cflags += [ "-fno-stack-protector" ] } else if (current_os != "aix") { # Not available on aix. - cflags += [ "-fstack-protector" ] + cflags += [ "-fstack-protector-strong" ] } } } -- 2.25.1