[FFmpeg-devel] [PATCH v2 2/2] configure: simplify bigendian check

Martin Storsjö martin at martin.st
Tue Apr 9 12:03:13 EEST 2024


On Mon, 8 Apr 2024, J. Dekker wrote:

> The preferred way to use LTO is --enable-lto but often times packagers
> still end up with -flto in cflags for various reasons. Using grep
> on binary object files is brittle and relies on specific object
> representation, which in the case of LLVM bitcode, debug-info or other
> intermediary formats can fail silently.
>
> This patch changes the check to a more commonly used define for
> big-endian systems.

It's not common only for big-endian systems, but for GCC-style compilers 
on all endians.

> More checks may need to be added in the future to cover legacy machines.

Don't use the word "legacy" here. This define is not standard, so it's 
perfectly plausible to have a modern, standards compliant compiler that 
just doesn't use this define.

With the commmit message you added here, the change is ok, but please do 
reword the last sentence above.

I'd suggest changing the last paragraph into this:

---
This patch changes the check to a more commonly used define for
GCC style compilers. More checks may be needed to cover other potential 
compilers that don't use the __BYTE_ORDER__ define.
---

// Martin



More information about the ffmpeg-devel mailing list