Skip to content

Commit ea7ff7a

Browse files
committed
Fix build of FFmpeg for Windows on ARM.
1 parent 29c7989 commit ea7ff7a

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

build_ffmpeg_win.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ make PREFIX="$FullScriptPath/../local" install
1414
cd $FullScriptPath/../ffmpeg
1515

1616
export PKG_CONFIG_PATH="$FullExecPath/../local/lib/pkgconfig:$PKG_CONFIG_PATH"
17+
export PATH="$FullExecPath/../gas-preprocessor:$PATH"
18+
echo \#\!/bin/sh > $FullExecPath/../gas-preprocessor/cpp
19+
echo cl \${@:1} >> $FullExecPath/../gas-preprocessor/cpp
20+
chmod a+x $FullExecPath/../gas-preprocessor/cpp
1721

18-
./configure --prefix=$FullScriptPath/../local \
22+
./configure --prefix=$FullScriptPath/../local $ARCH_PARAM \
1923
--toolchain=msvc \
2024
--extra-cflags="-DCONFIG_SAFE_BITSTREAM_READER=1" \
2125
--extra-cxxflags="-DCONFIG_SAFE_BITSTREAM_READER=1" \

ffmpeg.patch

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
diff --git a/configure b/configure
2+
index a89cfa6d95..466e6fe884 100755
3+
--- a/configure
4+
+++ b/configure
5+
@@ -6027,8 +6027,8 @@ if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then
6+
[ $target_os = "darwin" ] && gaspp_as_type="apple-$gaspp_as_type"
7+
8+
test "${as#*gas-preprocessor.pl}" != "$as" ||
9+
- test_cmd gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- ${as:=$cc} $as_noop &&
10+
- gas="${gas:=gas-preprocessor.pl} -arch $arch -as-type $gaspp_as_type -- ${as:=$cc}"
11+
+ test_cmd ../gas-preprocessor/gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- ${as:=$cc} $as_noop &&
12+
+ gas="${gas:=../gas-preprocessor/gas-preprocessor.pl} -verbose -arch $arch -as-type $gaspp_as_type -- ${as:=$cc}"
13+
14+
if ! check_gas ; then
15+
as=${gas:=$as}
16+
@@ -7168,7 +7168,7 @@ if enabled x86; then
17+
esac
18+
elif enabled_any aarch64 ppc64 && ! enabled bigendian; then
19+
case $target_os in
20+
- linux)
21+
+ linux|win32)
22+
;;
23+
*)
24+
disable ffnvcodec cuvid nvdec nvenc

0 commit comments

Comments
 (0)