Skip to content

Commit

Permalink
Adapt to clang 16
Browse files Browse the repository at this point in the history
  • Loading branch information
debugly committed Oct 31, 2024
1 parent 8fcd904 commit d3559ae
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
4 changes: 1 addition & 3 deletions do-compile/ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ CFG_FLAGS="$CFG_FLAGS --enable-neon"
CFG_FLAGS="$CFG_FLAGS --enable-asm"

C_FLAGS=
# https://gitlab.gnome.org/GNOME/gimp/-/issues/8649
# from clang 15 int <-> pointer conversions now defaults as an error
C_FLAGS="$C_FLAGS -Wno-int-conversion -fno-stack-check -arch $XC_ARCH"
C_FLAGS="$C_FLAGS -arch $XC_ARCH"
C_FLAGS="$C_FLAGS $XC_DEPLOYMENT_TARGET $XC_OTHER_CFLAGS"

if [[ "$XC_DEBUG" == "debug" ]]; then
Expand Down
31 changes: 31 additions & 0 deletions patches/ffmpeg-n6.1/0024-Adapt-to-clang-16.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 338d6fb305a992bc2a24347e4d7793e02b54345d Mon Sep 17 00:00:00 2001
From: qianlongxu <qianlongxu@gmail.com>
Date: Thu, 31 Oct 2024 10:55:33 +0800
Subject: [PATCH 24] Adapt to clang 16

---
configure | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 16d0177..edbb925 100755
--- a/configure
+++ b/configure
@@ -5623,7 +5623,13 @@ case $target_os in
enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
strip="${strip} -x"
add_ldflags -Wl,-dynamic,-search_paths_first
- check_cflags -Werror=partial-availability
+ # https://gitlab.gnome.org/GNOME/gimp/-/issues/8649
+ # from clang 15 int <-> pointer conversions now defaults as an error
+ check_cflags -Wno-int-conversion
+ # from clang 16 VTPixelTransferSessionCreate' has been marked as being introduced in tvOS 16.0 here, but the deployment target is tvOS 12.0.0
+ check_cflags -Wno-unguarded-availability -Wno-unguarded-availability-new
+
+ # check_cflags -Werror=partial-availability
SLIBSUF=".dylib"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
--
2.39.5 (Apple Git-154)

0 comments on commit d3559ae

Please sign in to comment.