From e2c342030c7919f2d5f434592bf7e0ef6e436139 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 14 Nov 2010 17:00:23 +0100 Subject: [PATCH] enable -mtune=native only on gcc 4.3 upwards --- all | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 2.39.2