diff mbox

[FFmpeg-devel,1/9] configure: [loongson] revert no-expensive-optimizations

Message ID 003401d43c20$42508420$c6f18c60$@loongson.cn
State Accepted
Headers show

Commit Message

Shiyou Yin Aug. 25, 2018, 3:03 a.m. UTC
>> Hi Michael, please help to review the following updates.
>>
>>
>> diff --git a/configure b/configure
>> index b9c9d0b..08cf48e 100755
>> --- a/configure
>> +++ b/configure
>> @@ -4796,15 +4796,24 @@ elif enabled mips; then
>>                  disable mipsfpu
>>                  disable mipsdsp
>>                  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
>
>This patch looks corrupted (by a newline)
>
>[...]


Hi Michael, has repasted below, To avoid being corrupted again, I add an attachment.

             ;;
--
2.1.0

Comments

Shiyou Yin Aug. 27, 2018, 8:10 a.m. UTC | #1
>-----Original Message-----
>From: ffmpeg-devel-bounces@ffmpeg.org [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf Of
>Shiyou Yin
>Sent: Saturday, August 25, 2018 11:04 AM
>To: 'FFmpeg development discussions and patches'
>Subject: Re: [FFmpeg-devel] [PATCH 1/9] configure: [loongson] revert no-expensive-optimizations
>
>>> Hi Michael, please help to review the following updates.
>>>
>>>
>>> diff --git a/configure b/configure
>>> index b9c9d0b..08cf48e 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -4796,15 +4796,24 @@ elif enabled mips; then
>>>                  disable mipsfpu
>>>                  disable mipsdsp
>>>                  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
>>
>>This patch looks corrupted (by a newline)
>>
>>[...]
>
>
>Hi Michael, has repasted below, To avoid being corrupted again, I add an attachment.
>
>diff --git a/configure b/configure
>index b9c9d0b..08cf48e 100755
>--- a/configure
>+++ b/configure
>@@ -4796,15 +4796,24 @@ elif enabled mips; then
>                 disable mipsfpu
>                 disable mipsdsp
>                 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
>                     loongson3*)
>-                        cpuflags="-march=loongson3a -mhard-float -fno-expensive-optimizations"
>+                        cpuflags="-march=loongson3a -mhard-float $expensive_optimization_flag"
>                     ;;
>                     loongson2e)
>-                        cpuflags="-march=loongson2e -mhard-float -fno-expensive-optimizations"
>+                        cpuflags="-march=loongson2e -mhard-float $expensive_optimization_flag"
>                     ;;
>                     loongson2f)
>-                        cpuflags="-march=loongson2f -mhard-float -fno-expensive-optimizations"
>+                        cpuflags="-march=loongson2f -mhard-float $expensive_optimization_flag"
>                     ;;
>                 esac
>             ;;
>--
>2.1.0

Is there any other comment for this patch?
Michael Niedermayer Aug. 27, 2018, 9:35 p.m. UTC | #2
On Mon, Aug 27, 2018 at 04:10:01PM +0800, Shiyou Yin wrote:
> 
> 
> >-----Original Message-----
> >From: ffmpeg-devel-bounces@ffmpeg.org [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf Of
> >Shiyou Yin
> >Sent: Saturday, August 25, 2018 11:04 AM
> >To: 'FFmpeg development discussions and patches'
> >Subject: Re: [FFmpeg-devel] [PATCH 1/9] configure: [loongson] revert no-expensive-optimizations
> >
> >>> Hi Michael, please help to review the following updates.
> >>>
> >>>
> >>> diff --git a/configure b/configure
> >>> index b9c9d0b..08cf48e 100755
> >>> --- a/configure
> >>> +++ b/configure
> >>> @@ -4796,15 +4796,24 @@ elif enabled mips; then
> >>>                  disable mipsfpu
> >>>                  disable mipsdsp
> >>>                  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
> >>
> >>This patch looks corrupted (by a newline)
> >>
> >>[...]
> >
> >
> >Hi Michael, has repasted below, To avoid being corrupted again, I add an attachment.
> >
> >diff --git a/configure b/configure
> >index b9c9d0b..08cf48e 100755
> >--- a/configure
> >+++ b/configure
> >@@ -4796,15 +4796,24 @@ elif enabled mips; then
> >                 disable mipsfpu
> >                 disable mipsdsp
> >                 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
> >                     loongson3*)
> >-                        cpuflags="-march=loongson3a -mhard-float -fno-expensive-optimizations"
> >+                        cpuflags="-march=loongson3a -mhard-float $expensive_optimization_flag"
> >                     ;;
> >                     loongson2e)
> >-                        cpuflags="-march=loongson2e -mhard-float -fno-expensive-optimizations"
> >+                        cpuflags="-march=loongson2e -mhard-float $expensive_optimization_flag"
> >                     ;;
> >                     loongson2f)
> >-                        cpuflags="-march=loongson2f -mhard-float -fno-expensive-optimizations"
> >+                        cpuflags="-march=loongson2f -mhard-float $expensive_optimization_flag"
> >                     ;;
> >                 esac
> >             ;;
> >--
> >2.1.0
> 
> Is there any other comment for this patch?

no, will apply

thanks

[...]
diff mbox

Patch

diff --git a/configure b/configure
index b9c9d0b..08cf48e 100755
--- a/configure
+++ b/configure
@@ -4796,15 +4796,24 @@  elif enabled mips; then
                 disable mipsfpu
                 disable mipsdsp
                 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
                     loongson3*)
-                        cpuflags="-march=loongson3a -mhard-float -fno-expensive-optimizations"
+                        cpuflags="-march=loongson3a -mhard-float $expensive_optimization_flag"
                     ;;
                     loongson2e)
-                        cpuflags="-march=loongson2e -mhard-float -fno-expensive-optimizations"
+                        cpuflags="-march=loongson2e -mhard-float $expensive_optimization_flag"
                     ;;
                     loongson2f)
-                        cpuflags="-march=loongson2f -mhard-float -fno-expensive-optimizations"
+                        cpuflags="-march=loongson2f -mhard-float $expensive_optimization_flag"
                     ;;
                 esac