Toolchain: Replace the -march=native flag with -mtune=native

This ensures inter-machine compatibility by not emitting any processor
specific instructions. This fixes the issue raised by the non AVX-512
supporting GitHub actions runners.
This commit is contained in:
Idan Horowitz 2021-05-21 14:22:39 +03:00 committed by Andreas Kling
parent bd1bdbe91b
commit bcfde43849
Notes: sideshowbarker 2024-07-18 17:37:58 +09:00

View file

@ -31,8 +31,8 @@ SYSTEM_NAME="$(uname -s)"
# We *most definitely* don't need debug symbols in the linker/compiler.
# This cuts the uncompressed size from 1.2 GiB per Toolchain down to about 120 MiB.
# Hence, this might actually cause marginal speedups, although the point is to not waste space as blatantly.
export CFLAGS="-g0 -O2 -march=native"
export CXXFLAGS="-g0 -O2 -march=native"
export CFLAGS="-g0 -O2 -mtune=native"
export CXXFLAGS="-g0 -O2 -mtune=native"
if [ "$SYSTEM_NAME" = "OpenBSD" ]; then
MAKE=gmake