diff --git a/builder/variants/defaults-gpl.sh b/builder/variants/defaults-gpl.sh index 4591981fe2c..e5a6523f669 100755 --- a/builder/variants/defaults-gpl.sh +++ b/builder/variants/defaults-gpl.sh @@ -6,5 +6,3 @@ GIT_BRANCH="jellyfin" LICENSE_FILE="COPYING.GPLv3" [[ $TARGET == linux* ]] && FF_CONFIGURE+=" --disable-libxcb --disable-xlib" || true -[[ $TARGET == win* ]] && FF_CFLAGS+=" -Wa,-muse-unaligned-vector-move" || true -[[ $TARGET == win* ]] && FF_CXXFLAGS+=" -Wa,-muse-unaligned-vector-move" || true diff --git a/debian/patches/0080-add-tonemapx-filter.patch b/debian/patches/0080-add-tonemapx-filter.patch index 7181d9b1446..68e808506cc 100644 --- a/debian/patches/0080-add-tonemapx-filter.patch +++ b/debian/patches/0080-add-tonemapx-filter.patch @@ -10,6 +10,23 @@ Index: FFmpeg/configure tonemap_vaapi_filter_deps="vaapi VAProcFilterParameterBufferHDRToneMapping" tonemap_opencl_filter_deps="opencl const_nan" tonemap_videotoolbox_filter_deps="metal corevideo videotoolbox const_nan" +@@ -7295,6 +7296,16 @@ elif enabled gcc; then + check_cflags -mpreferred-stack-boundary=4 + ;; + esac ++ elif enabled x86_64; then ++ case $target_os in ++ mingw64*|win64|cygwin*) ++ # GCC on Windows cannot guarantee a 32-byte aligned stack ++ # Such alignment is required by certain AVX instructions ++ # Force GCC to use the unaligned equivalents instead ++ check_cflags -Wa,-muse-unaligned-vector-move ++ check_cxxflags -Wa,-muse-unaligned-vector-move ++ ;; ++ esac + fi + elif enabled llvm_gcc; then + check_cflags -mllvm -stack-alignment=16 Index: FFmpeg/libavfilter/allfilters.c =================================================================== --- FFmpeg.orig/libavfilter/allfilters.c diff --git a/docker-build-win64.sh b/docker-build-win64.sh index eb63a6f39c9..2819658872b 100755 --- a/docker-build-win64.sh +++ b/docker-build-win64.sh @@ -588,9 +588,6 @@ ffversion="$(dpkg-parsechangelog --show-field Version)" if [[ -f "patches/series" ]]; then quilt push -a fi -# Workaround for GCC bug causing misaligned AVX instructions -CFLAGS+=" -Wa,-muse-unaligned-vector-move" -CXXFLAGS+=" -Wa,-muse-unaligned-vector-move" ./configure \ --prefix=${FF_PREFIX} \ ${FF_TARGET_FLAGS} \