From: Rudolf Polzer Date: Sun, 14 Nov 2010 16:00:23 +0000 (+0100) Subject: enable -mtune=native only on gcc 4.3 upwards X-Git-Tag: xonotic-v0.1.0preview~57^2 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=e2c342030c7919f2d5f434592bf7e0ef6e436139 enable -mtune=native only on gcc 4.3 upwards --- diff --git a/all b/all index 15704071..d022eb0d 100755 --- a/all +++ b/all @@ -800,7 +800,14 @@ case "$cmd" in ;; -r) debug=release - export CC="$CC -g -mtune=native -march=native" + export CC="$CC -g" + case "`$CC -dumpversion`" in + [5-9]*|[1-9][0-9]*|4.[3-9]*|4.[1-9][0-9]*) + # gcc 4.3 or higher + # -march=native is broken < 4.3 + export CC="$CC -mtune=native -march=native" + ;; + esac if [ -n "$WE_HATE_OUR_USERS" ]; then export CC="$CC -fno-common" fi