[x264-devel] Problems with cross-compiling for Freescale PowerPC
Ancoron Luciferis
ancoron at chaoslayer.de
Fri Jan 29 19:34:11 CET 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi *,
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 started natively 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?
How do I compile without AltiVec correctly?
Thanx,
Ancoron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAktjKhQACgkQHwxOsqv2bG3QkgCgu5DdjeRAbSwzf+GXG7oSRaZj
0ikAniGsAQ29JRNBanVkCmYwY3MiyDEN
=n74V
-----END PGP SIGNATURE-----
More information about the x264-devel
mailing list