From bcfde43849d1b7226812ec7c1f39fadd9d3d9a03 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Fri, 21 May 2021 14:22:39 +0300 Subject: [PATCH] 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. --- Toolchain/BuildIt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 9aa4a1dbdd5..90a86f33731 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -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