mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
rename --tune to --cpu and make --cpu pass the apropriate -march=xx option to the compiler.
Note that previous implementation (--tune) wasn't consistent with regards to setting -march/-mcpu/-mtune whereas current --cpu now is Original thread: Date: Oct 17, 2006 3:20 PM (patch) || Date: Oct 13, 2006 12:03 PM (suggestion of configure clean-up) Subject: Re: [Ffmpeg-devel] [PATH] test if cpu supports CMOV Originally committed as revision 6729 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
708e3e7d2d
commit
38d0a8aad8
34
configure
vendored
34
configure
vendored
@ -73,8 +73,8 @@ show_help(){
|
|||||||
echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
|
echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
|
||||||
echo " --build-suffix=SUFFIX suffix for application specific build []"
|
echo " --build-suffix=SUFFIX suffix for application specific build []"
|
||||||
echo " --arch=ARCH select architecture [$arch]"
|
echo " --arch=ARCH select architecture [$arch]"
|
||||||
echo " --tune=CPU tune code for a particular CPU"
|
echo " --cpu=CPU selects the minimum cpu required (affects
|
||||||
echo " (may fail or perform badly on other CPUs)"
|
instruction selection, may crash on older CPUs)"
|
||||||
echo " --powerpc-perf-enable enable performance report on PPC"
|
echo " --powerpc-perf-enable enable performance report on PPC"
|
||||||
echo " (requires enabling PMC)"
|
echo " (requires enabling PMC)"
|
||||||
echo " --disable-mmx disable MMX usage"
|
echo " --disable-mmx disable MMX usage"
|
||||||
@ -343,7 +343,7 @@ ranlib="ranlib"
|
|||||||
make="make"
|
make="make"
|
||||||
strip="strip"
|
strip="strip"
|
||||||
arch=`uname -m`
|
arch=`uname -m`
|
||||||
tune="generic"
|
cpu="generic"
|
||||||
powerpc_perf="no"
|
powerpc_perf="no"
|
||||||
mmx="default"
|
mmx="default"
|
||||||
armv5te="default"
|
armv5te="default"
|
||||||
@ -717,7 +717,7 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--arch=*) arch="$optval"
|
--arch=*) arch="$optval"
|
||||||
;;
|
;;
|
||||||
--tune=*) tune="$optval"
|
--cpu=*) cpu="$optval"
|
||||||
;;
|
;;
|
||||||
--powerpc-perf-enable) powerpc_perf="yes"
|
--powerpc-perf-enable) powerpc_perf="yes"
|
||||||
;;
|
;;
|
||||||
@ -1048,52 +1048,52 @@ fi
|
|||||||
# Add processor-specific flags
|
# Add processor-specific flags
|
||||||
TUNECPU="generic"
|
TUNECPU="generic"
|
||||||
POWERPCMODE="32bits"
|
POWERPCMODE="32bits"
|
||||||
if test $tune != "generic"; then
|
if test $cpu != "generic"; then
|
||||||
case $tune in
|
case $cpu in
|
||||||
601|ppc601|PowerPC601)
|
601|ppc601|PowerPC601)
|
||||||
add_cflags "-mcpu=601"
|
add_cflags "-march=601"
|
||||||
if test $altivec = "yes"; then
|
if test $altivec = "yes"; then
|
||||||
echo "WARNING: Tuning for PPC601 but AltiVec enabled!";
|
echo "WARNING: Tuning for PPC601 but AltiVec enabled!";
|
||||||
fi
|
fi
|
||||||
TUNECPU=ppc601
|
TUNECPU=ppc601
|
||||||
;;
|
;;
|
||||||
603*|ppc603*|PowerPC603*)
|
603*|ppc603*|PowerPC603*)
|
||||||
add_cflags "-mcpu=603"
|
add_cflags "-march=603"
|
||||||
if test $altivec = "yes"; then
|
if test $altivec = "yes"; then
|
||||||
echo "WARNING: Tuning for PPC603 but AltiVec enabled!";
|
echo "WARNING: Tuning for PPC603 but AltiVec enabled!";
|
||||||
fi
|
fi
|
||||||
TUNECPU=ppc603
|
TUNECPU=ppc603
|
||||||
;;
|
;;
|
||||||
604*|ppc604*|PowerPC604*)
|
604*|ppc604*|PowerPC604*)
|
||||||
add_cflags "-mcpu=604"
|
add_cflags "-march=604"
|
||||||
if test $altivec = "yes"; then
|
if test $altivec = "yes"; then
|
||||||
echo "WARNING: Tuning for PPC604 but AltiVec enabled!";
|
echo "WARNING: Tuning for PPC604 but AltiVec enabled!";
|
||||||
fi
|
fi
|
||||||
TUNECPU=ppc604
|
TUNECPU=ppc604
|
||||||
;;
|
;;
|
||||||
G3|g3|75*|ppc75*|PowerPC75*)
|
G3|g3|75*|ppc75*|PowerPC75*)
|
||||||
add_cflags "-mcpu=750 -mtune=750 -mpowerpc-gfxopt"
|
add_cflags "-march=750 -mpowerpc-gfxopt"
|
||||||
if test $altivec = "yes"; then
|
if test $altivec = "yes"; then
|
||||||
echo "WARNING: Tuning for PPC75x but AltiVec enabled!";
|
echo "WARNING: Tuning for PPC75x but AltiVec enabled!";
|
||||||
fi
|
fi
|
||||||
TUNECPU=ppc750
|
TUNECPU=ppc750
|
||||||
;;
|
;;
|
||||||
G4|g4|745*|ppc745*|PowerPC745*)
|
G4|g4|745*|ppc745*|PowerPC745*)
|
||||||
add_cflags "-mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
|
add_cflags "-march=7450 -mpowerpc-gfxopt"
|
||||||
if test $altivec = "no"; then
|
if test $altivec = "no"; then
|
||||||
echo "WARNING: Tuning for PPC745x but AltiVec disabled!";
|
echo "WARNING: Tuning for PPC745x but AltiVec disabled!";
|
||||||
fi
|
fi
|
||||||
TUNECPU=ppc7450
|
TUNECPU=ppc7450
|
||||||
;;
|
;;
|
||||||
74*|ppc74*|PowerPC74*)
|
74*|ppc74*|PowerPC74*)
|
||||||
add_cflags "-mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
|
add_cflags "-march=7400 -mpowerpc-gfxopt"
|
||||||
if test $altivec = "no"; then
|
if test $altivec = "no"; then
|
||||||
echo "WARNING: Tuning for PPC74xx but AltiVec disabled!";
|
echo "WARNING: Tuning for PPC74xx but AltiVec disabled!";
|
||||||
fi
|
fi
|
||||||
TUNECPU=ppc7400
|
TUNECPU=ppc7400
|
||||||
;;
|
;;
|
||||||
G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
|
G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
|
||||||
add_cflags "-mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
|
add_cflags "-march=970 -mpowerpc-gfxopt -mpowerpc64"
|
||||||
if test $altivec = "no"; then
|
if test $altivec = "no"; then
|
||||||
echo "WARNING: Tuning for PPC970 but AltiVec disabled!";
|
echo "WARNING: Tuning for PPC970 but AltiVec disabled!";
|
||||||
fi
|
fi
|
||||||
@ -1101,13 +1101,13 @@ if test $tune != "generic"; then
|
|||||||
POWERPCMODE="64bits"
|
POWERPCMODE="64bits"
|
||||||
;;
|
;;
|
||||||
i[3456]86|pentium|pentiumpro|pentium-mmx|pentium[234]|pentium-m|prescott|k6|k6-[23]|athlon|athlon-tbird|athlon-4|athlon-[mx]p|winchip-c6|winchip2|c3|nocona|athlon64|k8|opteron|athlon-fx)
|
i[3456]86|pentium|pentiumpro|pentium-mmx|pentium[234]|pentium-m|prescott|k6|k6-[23]|athlon|athlon-tbird|athlon-4|athlon-[mx]p|winchip-c6|winchip2|c3|nocona|athlon64|k8|opteron|athlon-fx)
|
||||||
add_cflags "-march=$tune"
|
add_cflags "-march=$cpu"
|
||||||
;;
|
;;
|
||||||
sparc64)
|
sparc64)
|
||||||
add_cflags "-mcpu=v9 -mtune=v9"
|
add_cflags "-march=v9"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "WARNING: Unknown CPU \"$tune\", ignored."
|
echo "WARNING: Unknown CPU \"$cpu\", ignored."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@ -1541,7 +1541,7 @@ echo "install prefix $PREFIX"
|
|||||||
echo "source path $source_path"
|
echo "source path $source_path"
|
||||||
echo "C compiler $cc"
|
echo "C compiler $cc"
|
||||||
echo "make $make"
|
echo "make $make"
|
||||||
echo "ARCH $arch ($tune)"
|
echo "ARCH $arch ($cpu)"
|
||||||
if test "$BUILDSUF" != ""; then
|
if test "$BUILDSUF" != ""; then
|
||||||
echo "build suffix $BUILDSUF"
|
echo "build suffix $BUILDSUF"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user