Force compiler code tuning to AMD Zen 3 architecture.

This commit is contained in:
inference 2023-01-03 20:29:35 +00:00
parent 235cca5c7c
commit 12527f7796

View File

@ -3,7 +3,7 @@
# Copyright 2022-2023 Inference
# SPDX-License-Identifier: BSD-3-Clause-Clear
# Version: 0.0.1.1
# Version: 1.0.0.2
# Toolchain.
@ -26,7 +26,7 @@ STRIP="strip"
C_SEC="-fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -fwrapv"
LD_SEC="-Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
## Compiler flags
CFLAGS="-march=znver3 -O2 -pipe -U__gnu_linux__ ${C_SEC}"
CXXFLAGS="-march=znver3 -O2 -pipe ${C_SEC}"
CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe -U__gnu_linux__ ${C_SEC}"
CXXFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe ${C_SEC}"
## Linker flags
LDFLAGS="-Wl,-O2 ${LD_SEC}"