* [FFmpeg-devel] [PATCH] configure: Disable inline assembly with nonlocal labels with LTO on Clang on Windows
@ 2023-12-20 12:42 Martin Storsjö
2024-01-04 12:48 ` Martin Storsjö
0 siblings, 1 reply; 2+ messages in thread
From: Martin Storsjö @ 2023-12-20 12:42 UTC (permalink / raw)
To: ffmpeg-devel
The file libavcodec/x86/mlpdsp_init.c uses inline assembly with
nonlocal labels that are referenced outside of the assembly in C.
This fails to link with LTO when built with Clang when targeting
Windows.
The root cause has been reported upstream at
https://github.com/llvm/llvm-project/issues/76046.
Fixes: https://trac.ffmpeg.org/ticket/10548
---
configure | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/configure b/configure
index 7742ea4ba2..b4f7c2de66 100755
--- a/configure
+++ b/configure
@@ -7372,6 +7372,16 @@ if [ -n "$lto" ]; then
check_cflags $lto
check_ldflags $lto $cpuflags
disable inline_asm_direct_symbol_refs
+ if test "$cc_type" = "clang"; then
+ # Clang's LTO fails on Windows, when there are references outside
+ # of inline assembly to nonlocal labels defined within inline assembly,
+ # see https://github.com/llvm/llvm-project/issues/76046.
+ case $target_os in
+ mingw32|win32)
+ disable inline_asm_nonlocal_labels
+ ;;
+ esac
+ fi
fi
enabled ftrapv && check_cflags -ftrapv
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] configure: Disable inline assembly with nonlocal labels with LTO on Clang on Windows
2023-12-20 12:42 [FFmpeg-devel] [PATCH] configure: Disable inline assembly with nonlocal labels with LTO on Clang on Windows Martin Storsjö
@ 2024-01-04 12:48 ` Martin Storsjö
0 siblings, 0 replies; 2+ messages in thread
From: Martin Storsjö @ 2024-01-04 12:48 UTC (permalink / raw)
To: ffmpeg-devel
On Wed, 20 Dec 2023, Martin Storsjö wrote:
> The file libavcodec/x86/mlpdsp_init.c uses inline assembly with
> nonlocal labels that are referenced outside of the assembly in C.
> This fails to link with LTO when built with Clang when targeting
> Windows.
>
> The root cause has been reported upstream at
> https://github.com/llvm/llvm-project/issues/76046.
>
> Fixes: https://trac.ffmpeg.org/ticket/10548
> ---
> configure | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/configure b/configure
> index 7742ea4ba2..b4f7c2de66 100755
> --- a/configure
> +++ b/configure
> @@ -7372,6 +7372,16 @@ if [ -n "$lto" ]; then
> check_cflags $lto
> check_ldflags $lto $cpuflags
> disable inline_asm_direct_symbol_refs
> + if test "$cc_type" = "clang"; then
> + # Clang's LTO fails on Windows, when there are references outside
> + # of inline assembly to nonlocal labels defined within inline assembly,
> + # see https://github.com/llvm/llvm-project/issues/76046.
> + case $target_os in
> + mingw32|win32)
> + disable inline_asm_nonlocal_labels
> + ;;
> + esac
> + fi
> fi
Will push soon
// Martin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-04 12:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-20 12:42 [FFmpeg-devel] [PATCH] configure: Disable inline assembly with nonlocal labels with LTO on Clang on Windows Martin Storsjö
2024-01-04 12:48 ` Martin Storsjö
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git