diff mbox series

[FFmpeg-devel] 0001-libavutil-tx-Check-also-for-ARCH_X86.patch

Message ID CANqtVemS_LokXV4YO2BEpQU-Cte4mi-Uu5kvMvPPbDVBpq5xfQ@mail.gmail.com
State New
Headers show
Series [FFmpeg-devel] 0001-libavutil-tx-Check-also-for-ARCH_X86.patch | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Alessandro Bono April 19, 2023, 3:07 p.m. UTC
Fallout from 9787005846893c1d1c01cb8ac71abed91980b218.

While it doesn't make sense to pass --enable-x86asm option in a arm64
build, this is the only place where we don't check also for ARCH_X86
when we check for HAVE_X86ASM in code that is not x86-specific. As
a consequence we get:
```
Undefined symbols for architecture arm64:
  "_ff_tx_codelet_list_float_x86", referenced from:
      _codelet_list in tx.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
```
diff mbox series

Patch

From c20c9ee960d23e5ca234e142f98f9a5c56243546 Mon Sep 17 00:00:00 2001
From: Alessandro Bono <alessandro.bono369@gmail.com>
Date: Tue, 18 Apr 2023 17:16:36 +0200
Subject: [PATCH] libavutil/tx: Check also for ARCH_X86

Fallout from 9787005846893c1d1c01cb8ac71abed91980b218.

While it doesn't make sense to pass --enable-x86asm option in a arm64
build, this is the only place where we don't check also for ARCH_X86
when we check for HAVE_X86ASM in code that is not x86-specific. As
a consequence we get:
```
Undefined symbols for architecture arm64:
  "_ff_tx_codelet_list_float_x86", referenced from:
      _codelet_list in tx.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
---
 libavutil/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/tx.c b/libavutil/tx.c
index e25abf998f..fb9d9f477a 100644
--- a/libavutil/tx.c
+++ b/libavutil/tx.c
@@ -341,7 +341,7 @@  static const FFTXCodelet * const * const codelet_list[] = {
     ff_tx_codelet_list_double_c,
     ff_tx_codelet_list_int32_c,
     ff_tx_null_list,
-#if HAVE_X86ASM
+#if ARCH_X86 && HAVE_X86ASM
     ff_tx_codelet_list_float_x86,
 #endif
 #if ARCH_AARCH64
-- 
2.34.1