[x264-devel] [PATCH] Fix build on Solaris 10 SPARC

Måns Rullgård mans at mansr.com
Tue Nov 23 14:32:09 CET 2010


"Sean McGovern" <gseanmcg at gmail.com> writes:

> Måns Rullgård <mans at mansr.com> wrote:
>
>> Sean McGovern <gseanmcg at gmail.com> writes:
>>
>>> How about replacing the current endian test with this snippet from
>>> autoconf's AC_C_BIGENDIAN test and then just testing against the
>>> return code?
>>>
>>> 	     union
>>> 	     {
>>> 	       long int l;
>>> 	       char c[sizeof (long int)];
>>> 	     } u;
>>> 	     u.l = 1;
>>> 	     return u.c[sizeof (long int) - 1] == 1;
>>
>> How do you intend for that to work if cross-compiling?
>
> You would have to test for crosscompile earlier and set an
> environment variable manually beforehand or add an argument to the
> script to explicitly declare the endianness you were building for
> (this is the same thing autoconf makes you do in this case, setting
> $ac_cv_big_endian to "yes" or "no" before calling configure.

Clearly, that is not acceptable.  I suggest leaving it as is for now.
If we come across a system where that doesn't work, we can fix it then.

-- 
Måns Rullgård
mans at mansr.com


More information about the x264-devel mailing list