Force compiler code tuning to AMD Zen 3 architecture. Fix Rust -C flags.

This commit is contained in:
inference 2023-01-03 14:04:45 +00:00
parent 733461ca65
commit 8d97c08187

View File

@ -3,7 +3,7 @@
# Copyright 2022-2023 Inference # Copyright 2022-2023 Inference
# SPDX-License-Identifier: BSD-3-Clause-Clear # SPDX-License-Identifier: BSD-3-Clause-Clear
# Version: 0.0.0.0 # Version: 1.0.0.1
# Flags # Flags
@ -11,8 +11,8 @@
#C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=pattern -fwrapv" #C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=pattern -fwrapv"
#LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro" #LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
## Compiler flags ## Compiler flags
CFLAGS="-march=znver3 -O2 -pipe -U__gnu_linux__" CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe -U__gnu_linux__"
CXXFLAGS="-march=znver3 -O2 -pipe" CXXFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe"
RUSTFLAGS="-Ctarget-cpu=znver3 -Copt-level=2 -Cdebuginfo=0" RUSTFLAGS="-C target-cpu=znver3 -Z tune-cpu=znver3 -C opt-level=2 -C debuginfo=0"
## Linker flags ## Linker flags
LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind" LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind"