mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
silence gcc 3.4 warnings, patch by VMiklos <mamajom@axelero.hu>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12667 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8e421507c5
commit
ffb3a457b6
38
configure
vendored
38
configure
vendored
@ -738,20 +738,28 @@ case "$host_arch" in
|
|||||||
# LGB: check -mcpu and -march swithing step by step with enabling
|
# LGB: check -mcpu and -march swithing step by step with enabling
|
||||||
# to fall back till 386.
|
# to fall back till 386.
|
||||||
|
|
||||||
|
# gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
|
||||||
|
|
||||||
|
if [ "$_cc_major" -gt 3 ] || ( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ]) ; then
|
||||||
|
cpuopt=-mtune
|
||||||
|
else
|
||||||
|
cpuopt=-mcpu
|
||||||
|
fi
|
||||||
|
|
||||||
echocheck "GCC & CPU optimization abilities"
|
echocheck "GCC & CPU optimization abilities"
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
int main(void) { return 0; }
|
int main(void) { return 0; }
|
||||||
EOF
|
EOF
|
||||||
if test "$_runtime_cpudetection" = no ; then
|
if test "$_runtime_cpudetection" = no ; then
|
||||||
if test "$proc" = "athlon-xp" || test "$proc" = "athlon-4" || test "$proc" = "athlon-tbird"; then
|
if test "$proc" = "athlon-xp" || test "$proc" = "athlon-4" || test "$proc" = "athlon-tbird"; then
|
||||||
cc_check -march=$proc -mcpu=$proc || proc=athlon
|
cc_check -march=$proc $cpuopt=$proc || proc=athlon
|
||||||
fi
|
fi
|
||||||
if test "$proc" = "k6-3" || test "$proc" = "k6-2"; then
|
if test "$proc" = "k6-3" || test "$proc" = "k6-2"; then
|
||||||
cc_check -march=$proc -mcpu=$proc || proc=k6
|
cc_check -march=$proc $cpuopt=$proc || proc=k6
|
||||||
fi
|
fi
|
||||||
if test "$proc" = "k6"; then
|
if test "$proc" = "k6"; then
|
||||||
if not cc_check -march=$proc -mcpu=$proc; then
|
if not cc_check -march=$proc $cpuopt=$proc; then
|
||||||
if cc_check -march=i586 -mcpu=i686; then
|
if cc_check -march=i586 $cpuopt=i686; then
|
||||||
proc=i586-i686
|
proc=i586-i686
|
||||||
else
|
else
|
||||||
proc=i586
|
proc=i586
|
||||||
@ -759,37 +767,37 @@ EOF
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if test "$proc" = "pentium4" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon"; then
|
if test "$proc" = "pentium4" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon"; then
|
||||||
cc_check -march=$proc -mcpu=$proc || proc=i686
|
cc_check -march=$proc $cpuopt=$proc || proc=i686
|
||||||
fi
|
fi
|
||||||
if test "$proc" = "i686" || test "$proc" = "pentium-mmx"; then
|
if test "$proc" = "i686" || test "$proc" = "pentium-mmx"; then
|
||||||
cc_check -march=$proc -mcpu=$proc || proc=i586
|
cc_check -march=$proc $cpuopt=$proc || proc=i586
|
||||||
fi
|
fi
|
||||||
if test "$proc" = "i586" ; then
|
if test "$proc" = "i586" ; then
|
||||||
cc_check -march=$proc -mcpu=$proc || proc=i486
|
cc_check -march=$proc $cpuopt=$proc || proc=i486
|
||||||
fi
|
fi
|
||||||
if test "$proc" = "i486" ; then
|
if test "$proc" = "i486" ; then
|
||||||
cc_check -march=$proc -mcpu=$proc || proc=i386
|
cc_check -march=$proc $cpuopt=$proc || proc=i386
|
||||||
fi
|
fi
|
||||||
if test "$proc" = "i386" ; then
|
if test "$proc" = "i386" ; then
|
||||||
cc_check -march=$proc -mcpu=$proc || proc=error
|
cc_check -march=$proc $cpuopt=$proc || proc=error
|
||||||
fi
|
fi
|
||||||
if test "$proc" = "error" ; then
|
if test "$proc" = "error" ; then
|
||||||
echores "Your $_cc does not even support \"i386\" for '-march' and '-mcpu'."
|
echores "Your $_cc does not even support \"i386\" for '-march' and '$cpuopt'."
|
||||||
_mcpu=""
|
_mcpu=""
|
||||||
_march=""
|
_march=""
|
||||||
_optimizing=""
|
_optimizing=""
|
||||||
elif test "$proc" = "i586-i686"; then
|
elif test "$proc" = "i586-i686"; then
|
||||||
_march="-march=i586"
|
_march="-march=i586"
|
||||||
_mcpu="-mcpu=i686"
|
_mcpu="$cpuopt=i686"
|
||||||
_optimizing="$proc"
|
_optimizing="$proc"
|
||||||
else
|
else
|
||||||
_march="-march=$proc"
|
_march="-march=$proc"
|
||||||
_mcpu="-mcpu=$proc"
|
_mcpu="$cpuopt=$proc"
|
||||||
_optimizing="$proc"
|
_optimizing="$proc"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# i686 is probably the most common CPU - optimize for it
|
# i686 is probably the most common CPU - optimize for it
|
||||||
_mcpu="-mcpu=i686"
|
_mcpu="$cpuopt=i686"
|
||||||
# at least i486 required, for bswap instruction
|
# at least i486 required, for bswap instruction
|
||||||
_march="-march=i486"
|
_march="-march=i486"
|
||||||
cc_check $_mcpu || _mcpu=""
|
cc_check $_mcpu || _mcpu=""
|
||||||
@ -802,10 +810,10 @@ EOF
|
|||||||
# TODO: it may be a good idea to check GCC and fall back in all cases
|
# TODO: it may be a good idea to check GCC and fall back in all cases
|
||||||
if test "$host_arch" = "i586-i686"; then
|
if test "$host_arch" = "i586-i686"; then
|
||||||
_march="-march=i586"
|
_march="-march=i586"
|
||||||
_mcpu="-mcpu=i686"
|
_mcpu="$cpuopt=i686"
|
||||||
else
|
else
|
||||||
_march="-march=$host_arch"
|
_march="-march=$host_arch"
|
||||||
_mcpu="-mcpu=$host_arch"
|
_mcpu="$cpuopt=$host_arch"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
proc="$host_arch"
|
proc="$host_arch"
|
||||||
|
Loading…
Reference in New Issue
Block a user