[FFmpeg-devel] [PATCH] make configure error out if endianness detection fails
Wed Sep 30 23:03:22 CEST 2009
Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> 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).
But that's not the compiler's fault.
>> > 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.
Yeah, probably. Remove it and see what happens.
>> > 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.
I've seen this on other non-standard systems too. Maybe I'll cook up
a proper solution some day.
mans at mansr.com
More information about the ffmpeg-devel