From efe980fc316b4d21cecb4aefdb1e127bbf8ca637 Mon Sep 17 00:00:00 2001 From: inference Date: Tue, 3 Jan 2023 14:02:28 +0000 Subject: [PATCH] Force compiler code tuning to AMD Zen 3 architecture. Fix Rust -C flags. --- portage/make.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/portage/make.conf b/portage/make.conf index 9ece246..772c7b7 100644 --- a/portage/make.conf +++ b/portage/make.conf @@ -3,7 +3,7 @@ # Copyright 2022-2023 Inference # SPDX-License-Identifier: BSD-3-Clause-Clear -# Version: 4.1.0.27 +# Version: 5.0.0.28 # System @@ -53,9 +53,9 @@ STRIP="llvm-strip" C_SEC="-D_FORTIFY_SOURCE=2 -fPIC -fPIE -fstack-clash-protection -fstack-protector-all -ftrivial-auto-var-init=pattern -fwrapv" LD_SEC="-Wl,-z,defs -Wl,-z,now -Wl,-pie -Wl,-z,relro -Wl,--strip-all" ## Compiler flags -CFLAGS="-march=znver3 -O2 -pipe -flto=thin -U__gnu_linux__ ${C_SEC}" -CXXFLAGS="-march=znver3 -O2 -pipe -flto=thin ${C_SEC}" -RUSTFLAGS="-Ctarget-cpu=znver3 -Copt-level=2 -Clto -Cembed-bitcode=y -Cdebuginfo=0" +CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe -flto=thin -U__gnu_linux__ ${C_SEC}" +CXXFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe -flto=thin ${C_SEC}" +RUSTFLAGS="-C target-cpu=znver3 -Z tune-cpu=znver3 -C opt-level=2 -C lto -C embed-bitcode=y -C debuginfo=0" ## Linker flags LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--thinlto-jobs=4 ${LD_SEC}" ## USE flags