[FFmpeg-devel] [PATCH] make configure error out if endianness detection fails

Reimar Döffinger Reimar.Doeffinger
Wed Sep 30 22:57:36 CEST 2009

On Wed, Sep 30, 2009 at 09:23:35PM +0100, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> > currently if e.g. the compiler manages to completely optimize away the
> > bigendian test, we will compile for little endian.
> Have you seen that happen?  It should not be possible.

Well, if someone had an OpenBSD bigendian system it would happen there
(due to od failing because of -A n).

> > This patch makes configure error out instead.
> > I'd also like to suggest to remove "-A n", the test IMO _should_ work
> > without
> I must have added it for a reason.

Well, I just couldn't think of a reason, if the value is unaligned and
wraps around it doesn't help with -A n, and the address incorrectly
causing a match seems very unlikely, too.

> > and it would move configure closer to working on OpenBSD (the
> > only other issue I know is that OpenBSD nm does not know -P).
> OpenBSD is hopelessly broken.  I honestly don't know what to do about
> it, except possibly ignore it.

Well, since we don't check for errors it currently work on little-endian
systems (and this patch would actually break it). nm failing is not
an issue either due to pure chance.
Still, a bit more POSIX-compliance sure would be nice.

More information about the ffmpeg-devel mailing list