From bec3b50ecd6882105a673ecac90360a4f56c573b Mon Sep 17 00:00:00 2001 From: inference Date: Tue, 17 Jan 2023 05:02:48 +0000 Subject: [PATCH] Remove hardening flags to allow untrusted packages to be specifically hardened using envs. Move linker stripping flag to standard linker flags. --- portage/env/gcc-nolto.conf | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/portage/env/gcc-nolto.conf b/portage/env/gcc-nolto.conf index b9ddc28..f39a674 100644 --- a/portage/env/gcc-nolto.conf +++ b/portage/env/gcc-nolto.conf @@ -3,7 +3,7 @@ # Copyright 2022-2023 Inference # SPDX-License-Identifier: BSD-3-Clause-Clear -# Version: 2.0.1.4 +# Version: 3.0.0.5 # Toolchain @@ -22,11 +22,8 @@ STRIP="strip" # Flags -## Hardening flags -C_SEC="-fPIC -fPIE -fstack-clash-protection -fstack-protector-strong -fwrapv" -LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro" ## Compiler flags -CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe -U__gnu_linux__ ${C_SEC}" -CXXFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe ${C_SEC}" +CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe -U__gnu_linux__" +CXXFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe" ## Linker flags -LDFLAGS="-Wl,-O2 ${LD_SEC}" +LDFLAGS="-Wl,--strip-all -Wl,-O2"