Mercurial > mplayer.hg
changeset 4217:2b141fcd69dd
Patch by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>:
- detect the Alpha CPU type: default ("ev56") won't work with older Alphas,
and gcc can take advantage of newer ones that way.
author | pl |
---|---|
date | Thu, 17 Jan 2002 09:32:22 +0000 |
parents | ffb8428f39e2 |
children | 3931c41f740a |
files | configure |
diffstat | 1 files changed, 33 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Thu Jan 17 09:20:29 2002 +0000 +++ b/configure Thu Jan 17 09:32:22 2002 +0000 @@ -470,6 +470,30 @@ fi +if [ "$host_arch" = alpha ]; then + echocheck "CPU type" +cat > $TMPC << EOF +int main() { + unsigned long ver, mask; + asm ("implver %0" : "=r" (ver)); + asm ("amask %1, %0" : "=r" (mask) : "r" (-1)); + printf("%ld-%x\n", ver, ~mask); + return 0; +} +EOF + $_cc -o "$TMPO" "$TMPC" + case `"$TMPO"` in + 0-0) proc="ev4" ;; + 1-0) proc="ev5" ;; + 1-1) proc="ev56" ;; + 1-101) proc="pca56" ;; + 2-303) proc="ev6" ;; + 2-307) proc="ev67" ;; + 2-1307) proc="ev68" ;; + esac + echores "$proc" +fi + case "$host_arch" in i[3-9]86|x86*) @@ -599,9 +623,16 @@ _target_arch='TARGET_ARCH_ALPHA = yes' _def_words_endian='#undef WORDS_BIGENDIAN' iproc='alpha' - proc='' _march='' - _mcpu='-mcpu=ev56' + echocheck "GCC & CPU optimization abilities" + if test "$proc" = "ev68" ; then + cc_check -mcpu=$proc || proc=ev67 + fi + if test "$proc" = "ev67" ; then + cc_check -mcpu=$proc || proc=ev6 + fi + _mcpu="-mcpu=$proc" + echores "$proc" ;; mips)