diff mbox

[FFmpeg-devel] configure: fix assignment of assembler specific flags

Message ID 20170623152500.6312-1-jamrial@gmail.com
State Accepted
Commit f66086adac5eb9b964c89ea0480487f48875f690
Headers show

Commit Message

James Almer June 23, 2017, 3:25 p.m. UTC
If the first assembler to be probed is an old nasm build, X86ASM_DEPFLAGS
will be set and remain so after yasm is ultimately used as fallback.
This results in yasm being called with said nasm specific flags and failing
during actual object assembly but not with configure sanity checks.

Regression since 5cae5a1defa360da076365a786093a749d1ddf4e

Signed-off-by: James Almer <jamrial@gmail.com>
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer June 23, 2017, 8:31 p.m. UTC | #1
On Fri, Jun 23, 2017 at 12:25:00PM -0300, James Almer wrote:
> If the first assembler to be probed is an old nasm build, X86ASM_DEPFLAGS
> will be set and remain so after yasm is ultimately used as fallback.
> This results in yasm being called with said nasm specific flags and failing
> during actual object assembly but not with configure sanity checks.
> 
> Regression since 5cae5a1defa360da076365a786093a749d1ddf4e
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  configure | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

seems to fix netbsd build

thx


[...]
James Almer June 23, 2017, 8:56 p.m. UTC | #2
On 6/23/2017 5:31 PM, Michael Niedermayer wrote:
> On Fri, Jun 23, 2017 at 12:25:00PM -0300, James Almer wrote:
>> If the first assembler to be probed is an old nasm build, X86ASM_DEPFLAGS
>> will be set and remain so after yasm is ultimately used as fallback.
>> This results in yasm being called with said nasm specific flags and failing
>> during actual object assembly but not with configure sanity checks.
>>
>> Regression since 5cae5a1defa360da076365a786093a749d1ddf4e
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>>  configure | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> seems to fix netbsd build
> 
> thx

Pushed, thanks.
diff mbox

Patch

diff --git a/configure b/configure
index dd9608540e..6da5e79b3d 100755
--- a/configure
+++ b/configure
@@ -5496,12 +5496,10 @@  EOF
             x86asmexe=$x86asmexe_probe
             x86asm_type=nasm
             x86asm_debug="-g -F dwarf"
-            X86ASM_DEPFLAGS='-MD $(@:.o=.d)'
         elif check_cmd $x86asmexe_probe --version; then
             x86asmexe=$x86asmexe_probe
             x86asm_type=yasm
             x86asm_debug="-g dwarf2"
-            X86ASMDEP='$(DEPX86ASM) $(X86ASMFLAGS) -M $(X86ASM_O) $< > $(@:.o=.d)'
         fi
         check_x86asm "movbe ecx, [5]" && enable x86asm
     }
@@ -5512,6 +5510,8 @@  EOF
             probe_x86asm $program && break
         done
         disabled x86asm && die "nasm/yasm not found or too old. Use --disable-x86asm for a crippled build."
+        test $x86asm_type = 'nasm' && X86ASM_DEPFLAGS='-MD $(@:.o=.d)'
+        test $x86asm_type = 'yasm' && X86ASMDEP='$(DEPX86ASM) $(X86ASMFLAGS) -M $(X86ASM_O) $< > $(@:.o=.d)'
         X86ASMFLAGS="-f $objformat"
         enabled pic               && append X86ASMFLAGS "-DPIC"
         test -n "$extern_prefix"  && append X86ASMFLAGS "-DPREFIX"