[FFmpeg-devel] [PATCH] forgotten "enable ppc64" for arch == ppc64

Reimar Döffinger Reimar.Doeffinger
Tue May 26 11:25:03 CEST 2009


On Tue, May 26, 2009 at 10:14:02AM +0100, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> 
> > On Mon, May 25, 2009 at 11:11:22PM +0100, M?ns Rullg?rd wrote:
> >> > @@ -1808,12 +1808,13 @@
> >> >          G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
> >> >              add_cflags -mcpu=970 -mpowerpc-gfxopt -mpowerpc64
> >> >              warn_altivec disabled PPC970
> >> > -            enable ppc64
> >> > +            subarch="ppc64"
> >> >          ;;
> >> >          Cell|CELL|cell)
> >> >              add_cflags -mcpu=cell
> >> >              warn_altivec disabled Cell
> >> > -            enable ppc64 ldbrx
> >> > +            subarch="ppc64"
> >> > +            enable ldbrx
> >> >          ;;
> >> 
> >> Remove all ppc64 manipulations here.
> >
> > I have some doubts that's going to really work in general, but patch
> > attached.
> 
> Why would it not work?  Remember that e.g. a 970 can be run 32-bit
> code, so setting ppc64 based on CPU type is wrong.

Well, I don't really know wtf that stuff is supposed to do, but this is
what my theory is.
Because if someone runs a g5 the arch returned by the OS is either ppc or ppc64.
If the arch is ppc and someone now uses -cpu=g5 it adds "-mpowerpc64",
so you get a 64 bit build but ARCH_PPC64 is not set.
Alternatively, if the arch returns ppc64, cpu is not given but the compiler
by default builds a 32 bit binary, ARCH_PPC64 ends up being set although
we are compiling a 32 bit binary.



More information about the ffmpeg-devel mailing list