Originally committed as revision 6729 to svn://svn.ffmpeg.org/ffmpeg/trunk
Guillaume Poirier authored on 2006/10/18 21:33:42... | ... |
@@ -73,8 +73,8 @@ show_help(){ |
73 | 73 |
echo " --extra-libs=ELIBS add ELIBS [$ELIBS]" |
74 | 74 |
echo " --build-suffix=SUFFIX suffix for application specific build []" |
75 | 75 |
echo " --arch=ARCH select architecture [$arch]" |
76 |
- echo " --tune=CPU tune code for a particular CPU" |
|
77 |
- echo " (may fail or perform badly on other CPUs)" |
|
76 |
+ echo " --cpu=CPU selects the minimum cpu required (affects |
|
77 |
+ instruction selection, may crash on older CPUs)" |
|
78 | 78 |
echo " --powerpc-perf-enable enable performance report on PPC" |
79 | 79 |
echo " (requires enabling PMC)" |
80 | 80 |
echo " --disable-mmx disable MMX usage" |
... | ... |
@@ -343,7 +343,7 @@ ranlib="ranlib" |
343 | 343 |
make="make" |
344 | 344 |
strip="strip" |
345 | 345 |
arch=`uname -m` |
346 |
-tune="generic" |
|
346 |
+cpu="generic" |
|
347 | 347 |
powerpc_perf="no" |
348 | 348 |
mmx="default" |
349 | 349 |
armv5te="default" |
... | ... |
@@ -717,7 +717,7 @@ for opt do |
717 | 717 |
;; |
718 | 718 |
--arch=*) arch="$optval" |
719 | 719 |
;; |
720 |
- --tune=*) tune="$optval" |
|
720 |
+ --cpu=*) cpu="$optval" |
|
721 | 721 |
;; |
722 | 722 |
--powerpc-perf-enable) powerpc_perf="yes" |
723 | 723 |
;; |
... | ... |
@@ -1048,52 +1048,52 @@ fi |
1048 | 1048 |
# Add processor-specific flags |
1049 | 1049 |
TUNECPU="generic" |
1050 | 1050 |
POWERPCMODE="32bits" |
1051 |
-if test $tune != "generic"; then |
|
1052 |
- case $tune in |
|
1051 |
+if test $cpu != "generic"; then |
|
1052 |
+ case $cpu in |
|
1053 | 1053 |
601|ppc601|PowerPC601) |
1054 |
- add_cflags "-mcpu=601" |
|
1054 |
+ add_cflags "-march=601" |
|
1055 | 1055 |
if test $altivec = "yes"; then |
1056 | 1056 |
echo "WARNING: Tuning for PPC601 but AltiVec enabled!"; |
1057 | 1057 |
fi |
1058 | 1058 |
TUNECPU=ppc601 |
1059 | 1059 |
;; |
1060 | 1060 |
603*|ppc603*|PowerPC603*) |
1061 |
- add_cflags "-mcpu=603" |
|
1061 |
+ add_cflags "-march=603" |
|
1062 | 1062 |
if test $altivec = "yes"; then |
1063 | 1063 |
echo "WARNING: Tuning for PPC603 but AltiVec enabled!"; |
1064 | 1064 |
fi |
1065 | 1065 |
TUNECPU=ppc603 |
1066 | 1066 |
;; |
1067 | 1067 |
604*|ppc604*|PowerPC604*) |
1068 |
- add_cflags "-mcpu=604" |
|
1068 |
+ add_cflags "-march=604" |
|
1069 | 1069 |
if test $altivec = "yes"; then |
1070 | 1070 |
echo "WARNING: Tuning for PPC604 but AltiVec enabled!"; |
1071 | 1071 |
fi |
1072 | 1072 |
TUNECPU=ppc604 |
1073 | 1073 |
;; |
1074 | 1074 |
G3|g3|75*|ppc75*|PowerPC75*) |
1075 |
- add_cflags "-mcpu=750 -mtune=750 -mpowerpc-gfxopt" |
|
1075 |
+ add_cflags "-march=750 -mpowerpc-gfxopt" |
|
1076 | 1076 |
if test $altivec = "yes"; then |
1077 | 1077 |
echo "WARNING: Tuning for PPC75x but AltiVec enabled!"; |
1078 | 1078 |
fi |
1079 | 1079 |
TUNECPU=ppc750 |
1080 | 1080 |
;; |
1081 | 1081 |
G4|g4|745*|ppc745*|PowerPC745*) |
1082 |
- add_cflags "-mcpu=7450 -mtune=7450 -mpowerpc-gfxopt" |
|
1082 |
+ add_cflags "-march=7450 -mpowerpc-gfxopt" |
|
1083 | 1083 |
if test $altivec = "no"; then |
1084 | 1084 |
echo "WARNING: Tuning for PPC745x but AltiVec disabled!"; |
1085 | 1085 |
fi |
1086 | 1086 |
TUNECPU=ppc7450 |
1087 | 1087 |
;; |
1088 | 1088 |
74*|ppc74*|PowerPC74*) |
1089 |
- add_cflags "-mcpu=7400 -mtune=7400 -mpowerpc-gfxopt" |
|
1089 |
+ add_cflags "-march=7400 -mpowerpc-gfxopt" |
|
1090 | 1090 |
if test $altivec = "no"; then |
1091 | 1091 |
echo "WARNING: Tuning for PPC74xx but AltiVec disabled!"; |
1092 | 1092 |
fi |
1093 | 1093 |
TUNECPU=ppc7400 |
1094 | 1094 |
;; |
1095 | 1095 |
G5|g5|970|ppc970|PowerPC970|power4*|Power4*) |
1096 |
- add_cflags "-mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64" |
|
1096 |
+ add_cflags "-march=970 -mpowerpc-gfxopt -mpowerpc64" |
|
1097 | 1097 |
if test $altivec = "no"; then |
1098 | 1098 |
echo "WARNING: Tuning for PPC970 but AltiVec disabled!"; |
1099 | 1099 |
fi |
... | ... |
@@ -1101,13 +1101,13 @@ if test $tune != "generic"; then |
1101 | 1101 |
POWERPCMODE="64bits" |
1102 | 1102 |
;; |
1103 | 1103 |
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) |
1104 |
- add_cflags "-march=$tune" |
|
1104 |
+ add_cflags "-march=$cpu" |
|
1105 | 1105 |
;; |
1106 | 1106 |
sparc64) |
1107 |
- add_cflags "-mcpu=v9 -mtune=v9" |
|
1107 |
+ add_cflags "-march=v9" |
|
1108 | 1108 |
;; |
1109 | 1109 |
*) |
1110 |
- echo "WARNING: Unknown CPU \"$tune\", ignored." |
|
1110 |
+ echo "WARNING: Unknown CPU \"$cpu\", ignored." |
|
1111 | 1111 |
;; |
1112 | 1112 |
esac |
1113 | 1113 |
fi |
... | ... |
@@ -1541,7 +1541,7 @@ echo "install prefix $PREFIX" |
1541 | 1541 |
echo "source path $source_path" |
1542 | 1542 |
echo "C compiler $cc" |
1543 | 1543 |
echo "make $make" |
1544 |
-echo "ARCH $arch ($tune)" |
|
1544 |
+echo "ARCH $arch ($cpu)" |
|
1545 | 1545 |
if test "$BUILDSUF" != ""; then |
1546 | 1546 |
echo "build suffix $BUILDSUF" |
1547 | 1547 |
fi |