mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
configure: [loongson] revert no-expensive-optimizations
Add gcc version check before add -fno-expensive-optimizations flag. Only when gcc version is lower than 5.3.0, this flag is needed. More bug info see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67736 https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00401.html Signed-off-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ad2ac1e7dd
commit
e13e52fd0d
15
configure
vendored
15
configure
vendored
@ -4819,15 +4819,24 @@ elif enabled mips; then
|
|||||||
disable mipsfpu
|
disable mipsfpu
|
||||||
disable mipsdsp
|
disable mipsdsp
|
||||||
disable mipsdspr2
|
disable mipsdspr2
|
||||||
|
# When gcc version less than 5.3.0, add -fno-expensive-optimizations flag.
|
||||||
|
if [ $cc == gcc ]; then
|
||||||
|
gcc_version=$(gcc -dumpversion)
|
||||||
|
if [ "$(echo "$gcc_version 5.3.0" | tr " " "\n" | sort -rV | head -n 1)" == "$gcc_version" ]; then
|
||||||
|
expensive_optimization_flag=""
|
||||||
|
else
|
||||||
|
expensive_optimization_flag="-fno-expensive-optimizations"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
case $cpu in
|
case $cpu in
|
||||||
loongson3*)
|
loongson3*)
|
||||||
cpuflags="-march=loongson3a -mhard-float -fno-expensive-optimizations"
|
cpuflags="-march=loongson3a -mhard-float $expensive_optimization_flag"
|
||||||
;;
|
;;
|
||||||
loongson2e)
|
loongson2e)
|
||||||
cpuflags="-march=loongson2e -mhard-float -fno-expensive-optimizations"
|
cpuflags="-march=loongson2e -mhard-float $expensive_optimization_flag"
|
||||||
;;
|
;;
|
||||||
loongson2f)
|
loongson2f)
|
||||||
cpuflags="-march=loongson2f -mhard-float -fno-expensive-optimizations"
|
cpuflags="-march=loongson2f -mhard-float $expensive_optimization_flag"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user