[MPlayer-dev-eng] OSX 10.4 - dcbzl instruction is only for 64-bit implementations error

Steven M. Schultz sms at 2BSD.COM
Mon May 9 01:04:45 CEST 2005


Hi -

	I know that this error:

cc -I../libvo -I../../libvo -I/usr/X11R6/include -O4   -faltivec -pipe -ffast-math -fomit-frame-pointer -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN -DCONFIG_DARWIN -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE  -c -o ppc/dsputil_ppc.o ppc/dsputil_ppc.c 
{standard input}:81:dcbzl instruction is only for 64-bit implementations (not allowed without -force_cpusubtype_ALL option)
{standard input}:108:dcbzl instruction is only for 64-bit implementations (not allowed without -force_cpusubtype_ALL option)
{standard input}:149:dcbzl instruction is only for 64-bit implementations (not allowed without -force_cpusubtype_ALL option)
gmake[1]: *** [ppc/dsputil_ppc.o] Error 1
gmake: *** [libavcodec/libavcodec.a] Error 2

	when using gcc4 on OSX 10.4 has been reported before.  It did seem
	strange to me that ffmpeg builds fine with gcc4 on OSX 10.4 but 
	MPlayer could not build libavcodec.

	A little investigation showed that ffmpeg does not set CONFIG_DARWIN
	when compiling libavcodec/ppc/* - this has the effect of declaring 
	'#define NO_DCBZL' which avoids the problem above.

	Attached is a patch to ./configure which sets 'NO_DCBZL' except in the
	case of a G5 which can run in 64bit mode (G3 and G4 processors can not).

	With this applied I got a little further - into demux_mov.c before
	compilation failed.  I'm going to take a look at that next ;)

	Cheers,
	Steven Schultz
-------------- next part --------------
--- configure.dist	2005-05-07 22:00:39.000000000 -0700
+++ configure	2005-05-08 15:55:32.000000000 -0700
@@ -609,7 +609,7 @@
       cc_version="v. ?.??, bad"
       cc_verc_fail=yes
       ;;
-    2.95.[2-9]|2.95.[2-9][-.]*|3.[0-9]|3.[0-9].[0-9])
+    2.95.[2-9]|2.95.[2-9][-.]*|3.[0-9]|3.[0-9].[0-9]|4.[0-9].[0-9])
       _cc_major=`echo $cc_version | cut -d '.' -f 1`
       _cc_minor=`echo $cc_version | cut -d '.' -f 2`
       _cc_mini=`echo $cc_version | cut -d '.' -f 3`
@@ -1000,6 +1000,7 @@
 
   ppc)
     _def_arch='#define ARCH_POWERPC 1'
+    _def_dcbzl='#define NO_DCBZL 1'
     _target_arch='TARGET_ARCH_POWERPC = yes'
     iproc='ppc'
     proc=''
@@ -1064,7 +1065,8 @@
 	# gcc 3.2 and up supports 970
 	if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3"; then
 	    case "$proc" in
-		970*) _march='-mcpu=970' _mcpu='-mtune=970' ;;
+		970*) _march='-mcpu=970' _mcpu='-mtune=970'
+                      _def_dcbzl='#undef NO_DCBZL' ;;
     		*) ;;
     	    esac
 	fi
@@ -7337,6 +7339,10 @@
 
 $_def_arch
 
+/* For the PPC.  G5 has the dcbzl when in 64bit mode but G4s and earlier do not
+   have the instruction. */
+$_def_dcbzl
+
 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
  * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
  */


More information about the MPlayer-dev-eng mailing list