Skip to content

Commit

Permalink
ci: move windows gcc workaround to configure script
Browse files Browse the repository at this point in the history
  • Loading branch information
gnattu committed Jul 1, 2024
1 parent 5b15f00 commit 713e707
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 0 additions & 2 deletions builder/variants/defaults-gpl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions debian/patches/0080-add-tonemapx-filter.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions docker-build-win64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down

0 comments on commit 713e707

Please sign in to comment.