summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authoryukari yakumo <yukariin@yandex.ru>2015-12-14 18:11:00 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-30 23:14:31 +0100
commitf87e29a61587558e441dea3511db76611de9d92e (patch)
treecb4c970e9d00bd791d20d06b931dfeee240aec89 /configure
parent0f387f2b6265e963d9cfd71239da3d8afa854b86 (diff)
configure: support --cpu=host and Clang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure b/configure
index 7fee737be7..da74ccd961 100755
--- a/configure
+++ b/configure
@@ -3981,6 +3981,17 @@ if test "$cpu" = host; then
}
cpu=$(check_native -march || check_native -mcpu)
;;
+ clang)
+ check_native(){
+ $cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
+ sed -n "/cc1.*-target-cpu /{
+ s/.*-target-cpu \\([^ ]*\\).*/\\1/
+ p
+ q
+ }" $TMPE
+ }
+ cpu=$(check_native -march)
+ ;;
esac
test "${cpu:-host}" = host &&