[FFmpeg-devel] [PATCH] configure: fix the bigendian test

David Michael fedora.dm0 at gmail.com
Thu Nov 12 00:25:13 EET 2020


On Wed, Nov 11, 2020 at 5:18 PM Martin Storsjö <martin at martin.st> wrote:
> On Wed, 11 Nov 2020, David Michael wrote:
> > There are two issues:
> >
> > The unused global integer does not make it into the compiled object
> > file, so declare it static to correct this.
>
> Umm, what? That sounds entirely counterintuitive to me.
>
> If the global integer is non-static, it could be referred to by another
> object file, so the compiler cannot omit it from the generated object
> file. On the other side, if the variable is static, the compiler has full
> visibility over any possible use, and sees that nothing in the same object
> file refers to it, and thus can omit it if it's unused.

LTO removes it if it is not static.  It is always present when it is static.

Thanks.

David


More information about the ffmpeg-devel mailing list