diff --git a/desktop/portage/env/gcc-nolto.conf b/desktop/portage/env/gcc-nolto.conf index 9e67e4e..25dfcd5 100644 --- a/desktop/portage/env/gcc-nolto.conf +++ b/desktop/portage/env/gcc-nolto.conf @@ -4,13 +4,16 @@ # Copyright 2022-2023 Inference # SPDX-License-Identifier: GPL-3.0-or-later -# Version: 6.0.0.9 +# Version: 7.0.0.10 # Flags +# Hardening flags +C_SEC="-fstack-clash-protection -fstack-protector-strong -ftrivial-auto-var-init=zero -fwrapv" +LD_SEC="-Wl,-z,defs -Wl,-z,now -Wl,-z,relro" ## Compiler flags -CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe" -CXXFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe" -RUSTFLAGS="-C debuginfo=0 -C target-cpu=znver3" +CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe ${C_SEC}" +CXXFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe ${C_SEC}" +RUSTFLAGS="-C debuginfo=0 -C opt-level=2 -C target-cpu=znver3" ## Linker flags -LDFLAGS="-Wl,-O2 -Wl,--strip-all" +LDFLAGS="-Wl,-O2 -Wl,--strip-all ${LD_SEC}"