[x264-devel] Please add support for non-AltiVec PowerPCs

Jason Garrett-Glaser darkshikari at gmail.com
Thu Feb 25 00:33:28 CET 2010


On Wed, Feb 24, 2010 at 3:24 PM, Ancoron Luciferis
<ancoron at chaoslayer.de> wrote:
> Hi *,
>
> this is my second attempt to get some attention for the situation I have.
>
> I just wanted to cross-compile the x264 for use at my small NAS here at
> home (Synology DS-409+). It has a PowerPC CPU without the altivec
> extensions. But as far as I can see the code altivec seems to be
> required as it is assumed in almost every place.
>
> E.g. the configure script:
>
>>  powerpc|powerpc64)
>>    ARCH="PPC"
>>    if [ $SYS = MACOSX ]
>>    then
>>      CFLAGS="$CFLAGS -faltivec -fastf -mcpu=G4"
>>    else
>>      CFLAGS="$CFLAGS -maltivec -mabi=altivec -DHAVE_ALTIVEC_H"
>>    fi
>>    ;;
>
> When compiled directly on that box the following shows up (modified the
> configure script to show error output from cc_check function):
>
>> + echo int main () {  return 0; }
>> + gcc conftest.c -Wall -I. -DHAVE_MALLOC_H -maltivec -mabi=altivec
>>   -DHAVE_ALTIVEC_H -lm -o conftest
>> conftest.c:1: error: AltiVec and E500 instructions cannot coexist
>> + die No working C compiler found.
>
> The CPU is a Freescale MPC8533 and has one e500v2 core at 1.067 GHz. So
> the next thing I tried was to remove the alitvec flags and see what happens:
>
>> gcc -O4 -ffast-math  -Wall -I. -DHAVE_MALLOC_H -DARCH_PPC \
>>   -DSYS_LINUX -DWORDS_BIGENDIAN -DHAVE_PTHREAD -fPIC -s \
>>   -fomit-frame-pointer   -c -o common/ppc/mc.o common/ppc/mc.c
>> In file included from common/ppc/mc.c:34:
>> common/ppc/ppccommon.h:46: error: syntax error before "vector"
>> common/ppc/ppccommon.h:46: warning: no semicolon at end of \
>>   struct or union
>> common/ppc/ppccommon.h:47: warning: type defaults to `int' \
>>   in declaration of `vec_u32_u'
>> common/ppc/ppccommon.h:47: warning: data definition has no \
>>   type or storage class
>> common/ppc/ppccommon.h:51: error: syntax error before "vector"
>> common/ppc/ppccommon.h:51: warning: no semicolon at end of \
>>   struct or union
>> common/ppc/ppccommon.h:52: warning: type defaults to `int' \
>>   in declaration of `vec_u16_u'
>> ...
>
> OK, no altivec.h included = no vector. But why is it assumed that every
> PowerPC based things also supports AltiVec? Why is there no fallback
> available?

If there isn't, that's a problem.  Patches welcome.

Dark Shikari


More information about the x264-devel mailing list