X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=d022eb0d31b0801ffdf9c0ba4f07936e1b40769e;hp=15704071284f798394e08ff5e1f241e4c23ce6ad;hb=e2c342030c7919f2d5f434592bf7e0ef6e436139;hpb=6db2d8af66c0377aed2458521f806ea342c7822b 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