[PR] Some docs cleanup (PR #24243)

Kacper Michajłow via ffmpeg-devel <[email protected]>
Newsgroups gmane.comp.video.ffmpeg.devel
Message-ID <[email protected]>
PR #24243 opened by Kacper Michajłow (kasper93)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24243
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24243.patch


From c2c5f235c637b4b4e1d2880fe2186c67863d99ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 18:14:24 +0200
Subject: [PATCH 1/6] configure: add missing pfx to djgpp __STRICT_ANSI__ flag
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The host libc probe was adding the flag to target cppflags.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 594697b64b..805110d580 100755
--- a/configure
+++ b/configure
@@ -6476,7 +6476,7 @@ probe_libc(){
         add_${pfx}cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
     elif test_${pfx}cpp_condition sys/version.h "defined __DJGPP__"; then
         eval ${pfx}libc_type=djgpp
-        add_cppflags -U__STRICT_ANSI__
+        add_${pfx}cppflags -U__STRICT_ANSI__
         add_allcflags "-include $source_path/compat/djgpp/math.h"
         add_compat djgpp/math.o
     fi
-- 
2.52.0


From faf426d2f9987207b3509c1bd3b391d6cf27ba7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 18:14:38 +0200
Subject: [PATCH 2/6] ffbuild/common: remove .ho from CLEANSUFFIXES
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Nothing has produced .ho files since dfd9159f3d in 2012, when
checkheaders switched to compiling wrapper .c files.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 ffbuild/common.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index 49cb6623a9..1f6c5a7522 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -259,7 +259,7 @@ $(TOOLOBJS): | tools
 
 OUTDIRS := $(OUTDIRS) $(dir $(OBJS) $(HOBJS) $(HOSTOBJS) $(SHLIBOBJS) $(STLIBOBJS) $(TESTOBJS))
 
-CLEANSUFFIXES     = *.d *.gcda *.gcno *.h.c *.ho *.map *.o *.objs *.pc *.ptx *.ptx.gz *.ptx.c *.spv *.spv.gz *.spv.c *.gen.asm *.gen.c *.gen.S *.ver *.version *.html.gz *.html.c *.css.min.gz *.css.min *.css.c *~ *.ilk *.pdb
+CLEANSUFFIXES     = *.d *.gcda *.gcno *.h.c *.map *.o *.objs *.pc *.ptx *.ptx.gz *.ptx.c *.spv *.spv.gz *.spv.c *.gen.asm *.gen.c *.gen.S *.ver *.version *.html.gz *.html.c *.css.min.gz *.css.min *.css.c *~ *.ilk *.pdb
 LIBSUFFIXES       = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a
 
 define RULES
-- 
2.52.0


From 71e50c45f86b720997c945e8aa5126e51cb5a9f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 18:14:51 +0200
Subject: [PATCH 3/6] compat/w32pthreads: drop stale Vista reference in comment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Windows 7 is the minimum, the API choice is unconditional.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 compat/w32pthreads.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h
index 5d01d1a14e..d39d3dc428 100644
--- a/compat/w32pthreads.h
+++ b/compat/w32pthreads.h
@@ -53,7 +53,7 @@ typedef struct w32pthread_t {
     void *ret;
 } *pthread_t;
 
-/* use light weight mutex/condition variable API for Windows Vista and later */
+/* use light weight mutex/condition variable API */
 typedef SRWLOCK pthread_mutex_t;
 typedef CONDITION_VARIABLE pthread_cond_t;
 
-- 
2.52.0


From 990ab28880488e37a2025d3c32e2d3aec17b0f78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 18:16:57 +0200
Subject: [PATCH 4/6] doc/platform: remove obsolete toolchain guidance
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Drop advice that stopped being true years ago: the GNU as 2.15 warning,
Solaris values-xpg6.o and shell-bug workarounds, gas-preprocessor for
PowerPC Mac and iPhone, MSVC 2013 as the supported compiler together
with the inline define and msinttypes notes, the mingw.org
cross-compilation instructions, Cygwin 1.5/1.7 and Cygwin Ports notes
and the -mno-cygwin cross build.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 doc/platform.texi | 116 ++++++++++------------------------------------
 1 file changed, 25 insertions(+), 91 deletions(-)

diff --git a/doc/platform.texi b/doc/platform.texi
index 5ed6997cef..521c437f04 100644
--- a/doc/platform.texi
+++ b/doc/platform.texi
@@ -12,19 +12,6 @@
 
 @chapter Unix-like
 
-Some parts of FFmpeg cannot be built with version 2.15 of the GNU
-assembler which is still provided by a few AMD64 distributions. To
-make sure your compiler really uses the required version of gas
-after a binutils upgrade, run:
-
-@example
-$(gcc -print-prog-name=as) --version
-@end example
-
-If not, then you should install a different compiler that has no
-hard-coded path to gas. In the worst case pass @code{--disable-asm}
-to configure.
-
 @section Advanced linking configuration
 
 If you compiled FFmpeg libraries statically and you want to use them to
@@ -47,17 +34,7 @@ BSD make will not build FFmpeg, you need to install and use GNU Make
 @section (Open)Solaris
 
 GNU Make is required to build FFmpeg, so you have to invoke (@command{gmake}),
-standard Solaris Make will not work. When building with a non-c99 front-end
-(gcc, generic suncc) add either @code{--extra-libs=/usr/lib/values-xpg6.o}
-or @code{--extra-libs=/usr/lib/64/values-xpg6.o} to the configure options
-since the libc is not c99-compliant by default. The probes performed by
-configure may raise an exception leading to the death of configure itself
-due to a bug in the system shell. Simply invoke a different shell such as
-bash directly to work around this:
-
-@example
-bash ./configure
-@end example
+standard Solaris Make will not work.
 
 @anchor{Darwin}
 @section Darwin (Mac OS X, iPhone)
@@ -65,17 +42,11 @@ bash ./configure
 The toolchain provided with Xcode is sufficient to build the basic
 unaccelerated code.
 
-Mac OS X on PowerPC or ARM (iPhone) requires a preprocessor from
-@url{https://github.com/FFmpeg/gas-preprocessor} or
-@url{https://github.com/yuvi/gas-preprocessor}(currently outdated) to build the optimized
-assembly functions. Put the Perl script somewhere
-in your PATH, FFmpeg's configure will pick it up automatically.
-
-Mac OS X on amd64 and x86 requires @command{nasm} to build most of the
-optimized assembly functions. @uref{http://www.finkproject.org/, Fink},
+macOS on x86 requires @command{nasm} to build most of the
+optimized assembly functions.
 @uref{https://wiki.gentoo.org/wiki/Project:Prefix, Gentoo Prefix},
-@uref{https://mxcl.github.com/homebrew/, Homebrew}
-or @uref{http://www.macports.org, MacPorts} can easily provide it.
+@uref{https://brew.sh/, Homebrew}
+or @uref{https://www.macports.org, MacPorts} can easily provide it.
 
 
 @chapter DOS
@@ -145,18 +116,20 @@ To target 32 bits replace @code{x86_64} with @code{i686} in the command above.
 
 @section Microsoft Visual C++ or Intel C++ Compiler for Windows
 
-FFmpeg can be built with MSVC 2013 or later.
+FFmpeg can be built with MSVC 2019 16.8 or later, the first version able to
+compile C11.
 
 You will need the following prerequisites:
 
 @itemize
-@item @uref{http://msys2.github.io/, MSYS2}
-@item @uref{http://www.nasm.us/, NASM}
+@item @uref{https://www.msys2.org/, MSYS2}
+@item @uref{https://www.nasm.us/, NASM}
 (Also available via MSYS2's package manager.)
 @end itemize
 
-To set up a proper environment in MSYS2, you need to run @code{msys_shell.bat} from
-the Visual Studio or Intel Compiler command prompt.
+To set up a proper environment in MSYS2, you need to run
+@code{msys2_shell.cmd -use-full-path} from the Visual Studio or Intel Compiler
+command prompt.
 
 Place @code{nasm.exe} somewhere in your @code{PATH}.
 
@@ -204,14 +177,6 @@ erroneously included when building FFmpeg.
 can see.
 @end enumerate
 
-@item FFmpeg has been tested with the following on i686 and x86_64:
-@itemize
-@item Visual Studio 2013 Pro and Express
-@item Intel Composer XE 2013
-@item Intel Composer XE 2013 SP1
-@end itemize
-Anything else is not officially supported.
-
 @end itemize
 
 @subsection Linking to FFmpeg with Microsoft Visual C++
@@ -220,14 +185,6 @@ If you plan to link with MSVC-built static libraries, you will need
 to make sure you have @code{Runtime Library} set to
 @code{Multi-threaded (/MT)} in your project's settings.
 
-You will need to define @code{inline} to something MSVC understands:
-@example
-#define inline __inline
-@end example
-
-Also note, that as stated in @strong{Microsoft Visual C++}, you will need
-an MSVC-compatible @uref{http://code.google.com/p/msinttypes/, inttypes.h}.
-
 If you plan on using import libraries created by dlltool, you must
 set @code{References} to @code{No (/OPT:NOREF)} under the linker optimization
 settings, otherwise the resulting binaries will fail during runtime.
@@ -242,10 +199,8 @@ To create import libraries that work with the @code{/OPT:REF} option
 
 @item Open the @emph{Visual Studio Command Prompt}.
 
-Alternatively, in a normal command line prompt, call @file{vcvars32.bat}
-which sets up the environment variables for the Visual C++ tools
-(the standard location for this file is something like
-@file{C:\Program Files (x86_\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat}).
+Alternatively, in a normal command line prompt, call @file{vcvarsall.bat}
+which sets up the environment variables for the Visual C++ tools.
 
 @item Enter the @file{bin} directory where the created LIB and DLL files
 are stored.
@@ -263,27 +218,24 @@ Replace @code{foo-version} and @code{foo} with the respective library names.
 @anchor{Cross compilation for Windows with Linux}
 @section Cross compilation for Windows with Linux
 
-You must use the MinGW cross compilation tools available at
-@url{http://www.mingw.org/}.
+You must use the MinGW-w64 cross compilation tools, which most Linux
+distributions provide as packages.
 
 Then configure FFmpeg with the following options:
 @example
-./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
+./configure --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32-
 @end example
 (you can change the cross-prefix according to the prefix chosen for the
-MinGW tools).
+MinGW-w64 tools).
 
-Then you can easily test FFmpeg with @uref{http://www.winehq.com/, Wine}.
+Then you can easily test FFmpeg with @uref{https://www.winehq.org/, Wine}.
 
 @section Compilation under Cygwin
 
-Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack
-llrint() in its C library.
-
 Install your Cygwin with all the "Base" packages, plus the
 following "Devel" ones:
 @example
-binutils, gcc4-core, make, git, mingw-runtime, texinfo
+binutils, gcc-core, make, git, texinfo
 @end example
 
 In order to run FATE you will also need the following "Utils" packages:
@@ -297,37 +249,19 @@ If you want to build FFmpeg with additional libraries, download Cygwin
 libogg-devel, libvorbis-devel
 @end example
 
-These library packages are only available from
-@uref{http://sourceware.org/cygwinports/, Cygwin Ports}:
-
-@example
-libSDL-devel, libgsm-devel, libmp3lame-devel,
-speex-devel, libtheora-devel, libxvidcore-devel
-@end example
-
-The recommendation for x264 is to build it from source, as it evolves too
-quickly for Cygwin Ports to be up to date.
-
 @section Crosscompilation for Windows under Cygwin
 
 With Cygwin you can create Windows binaries that do not need the cygwin1.dll.
 
-Just install your Cygwin as explained before, plus these additional
-"Devel" packages:
+Just install your Cygwin as explained before, plus the MinGW-w64 cross
+toolchain "Devel" packages:
 @example
-gcc-mingw-core, mingw-runtime, mingw-zlib
+mingw64-x86_64-gcc-core, mingw64-x86_64-binutils
 @end example
 
-and add some special flags to your configure invocation.
-
-For a static build run
+and configure with:
 @example
-./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
-@end example
-
-and for a build with shared libraries
-@example
-./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
+./configure --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32-
 @end example
 
 @section ARM64EC
-- 
2.52.0


From 533567c0604b27aadc1760128988ea37704b24d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 18:17:16 +0200
Subject: [PATCH 5/6] doc/faq: update stale compiler and build answers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

C11 is the requirement now, __STDC_CONSTANT_MACROS has been implied
since C++11, and AviSynth+ works beyond MinGW/Cygwin since 2020.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 doc/faq.texi | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/doc/faq.texi b/doc/faq.texi
index 477cc60533..ac638f0d2f 100644
--- a/doc/faq.texi
+++ b/doc/faq.texi
@@ -272,8 +272,7 @@ material, and try '-top 0/1' if the result looks really messed-up.
 
 @section How can I read DirectShow files?
 
-If you have built FFmpeg with @code{./configure --enable-avisynth}
-(only possible on MinGW/Cygwin platforms),
+If you have built FFmpeg with @code{./configure --enable-avisynth},
 then you may use any file that DirectShow can read as input.
 
 Just create an "input.avs" text file with this single line ...
@@ -583,7 +582,7 @@ already incorporate FFmpeg at (@url{projects.html}).
 
 @section Can you support my C compiler XXX?
 
-It depends. If your compiler is C99-compliant, then patches to support
+It depends. If your compiler is C11-compliant, then patches to support
 it are likely to be welcome if they do not pollute the source code
 with @code{#ifdef}s related to the compiler.
 
@@ -642,11 +641,6 @@ encompassing your FFmpeg includes using @code{extern "C"}.
 
 See @url{http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3}
 
-@section I'm using libavutil from within my C++ application but the compiler complains about 'UINT64_C' was not declared in this scope
-
-FFmpeg is a pure C project using C99 math features, in order to enable C++
-to use them you have to append -D__STDC_CONSTANT_MACROS to your CXXFLAGS
-
 @section I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?
 
 You have to create a custom AVIOContext using @code{avio_alloc_context},
-- 
2.52.0


From 9c07e5b35f1575f4717b477bd500a4a9b32aab51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 18:41:05 +0200
Subject: [PATCH 6/6] doc/platform: modernize MSYS2 build instructions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Describe the current UCRT64, CLANG64 and CLANGARM64 environments, point
to the per-environment launchers, use pacboy so the package commands
work in every environment, and update the stale MSYS2 and MinGW-w64
URLs.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 doc/platform.texi | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/doc/platform.texi b/doc/platform.texi
index 521c437f04..f7ab5c66c2 100644
--- a/doc/platform.texi
+++ b/doc/platform.texi
@@ -67,7 +67,7 @@ For information about compiling FFmpeg on OS/2 see
 
 FFmpeg can be built to run natively on Windows using the MinGW-w64
 toolchain. Install the latest versions of MSYS2 and MinGW-w64 from
-@url{http://msys2.github.io/} and/or @url{http://mingw-w64.sourceforge.net/}.
+@url{https://www.msys2.org/} and/or @url{https://www.mingw-w64.org/}.
 You can find detailed installation instructions in the download section and
 the FAQ.
 
@@ -75,10 +75,10 @@ Notes:
 
 @itemize
 
-@item Building for the MSYS environment is discouraged, MSYS2 provides a full
-MinGW-w64 environment through @file{mingw64_shell.bat} or
-@file{mingw32_shell.bat} that should be used instead of the environment
-provided by @file{msys2_shell.bat}.
+@item Building for the MSYS environment is discouraged, use one of the
+MinGW-w64 environments provided by MSYS2 instead. UCRT64 provides a GCC
+based toolchain, CLANG64 a LLVM based one and CLANGARM64 targets Windows
+on ARM64.
 
 @item Building using MSYS2 can be sped up by disabling implicit rules in the
 Makefile by calling @code{make -r} instead of plain @code{make}. This
@@ -97,23 +97,24 @@ libavformat) as DLLs.
 
 @subsection Native Windows compilation using MSYS2
 
-The MSYS2 MinGW-w64 environment provides ready to use toolchains and dependencies
-through @command{pacman}.
+The MSYS2 MinGW-w64 environments provide ready to use toolchains and
+dependencies through @command{pacman}.
 
-Make sure to use @file{mingw64_shell.bat} or @file{mingw32_shell.bat} to have
-the correct MinGW-w64 environment. The default install provides shortcuts to
-them under @command{MinGW-w64 Win64 Shell} and @command{MinGW-w64 Win32 Shell}.
+Launch the shell of the environment you want to build in using its
+launcher, for example @file{ucrt64.exe} or the corresponding start menu
+shortcut for UCRT64. Then install the toolchain and the FFmpeg
+dependencies. The @command{pacboy} wrapper from the @code{pactoys}
+package fills in the package name prefix of the current environment, so
+the same command works in every environment.
 
 @example
 # normal msys2 packages
-pacman -S make pkgconf diffutils
+pacman -S make pkgconf diffutils pactoys
 
-# mingw-w64 packages and toolchains
-pacman -S mingw-w64-x86_64-nasm mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2
+# mingw-w64 packages and toolchains for the current environment
+pacboy -S cc nasm SDL2
 @end example
 
-To target 32 bits replace @code{x86_64} with @code{i686} in the command above.
-
 @section Microsoft Visual C++ or Intel C++ Compiler for Windows
 
 FFmpeg can be built with MSVC 2019 16.8 or later, the first version able to
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.