[MPlayer-dev-eng] [PATCH] AIX PPC mplayer port

Derek E. Lewis dlewis at solnetworks.net
Tue Dec 27 05:21:43 CET 2005


I've begun working on porting mplayer to AIX/PowerPC (not POWER, yet). 
The initial port wasn't too hard to do, as you can see -- add a few 
pre-processor macros here and there, and make some minor changes to the 
configure and Makefile files.

With the patches, I've built mplayer successfully on AIX 5.1 on my 
7025-F40, which has a PowerPC 604e in it.  It would seem that various 
files (snow.c and friends) don't assemble correctly using the IBM-supplied 
'as', so right now, I'm trying to find a workaround to use the GNU 'as' 
with the arguments, '-mppc' or -m604' (as not specifying the target 
architecture works improperly).

If anyone would like to build mplayer on an RS/6000 with a PowerPC running 
AIX 5.1 or higher, you'll need to apply these patches and manually 
assemble the following files until I find a way to force the usage of GNU 
'as' with either '-m604' or '-mppc':

libavcodec/snow.c
libavcodec/vp3.c
libavcodec/ppc/dsputil_ppc.c

For those of you wondering why libC is required, .powf() is defined in 
libC and not in libm on AIX.

I'll begin work on the POWER 3/4/5 port shortly. This will be a lot more 
difficult, because even though the POWER and PowerPC are *very* similar, 
they're still not the same processor.  The PowerPC has some instructions 
the POWER doesn't have and vice versa.

Derek E. Lewis
dlewis at solnetworks.net
http://riemann.solnetworks.net/~dlewis
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.333
diff -r1.333 Makefile
397a398
> 	       $(AIX_LIBC_LIB) \
426a428
> 		$(AIX_LIBC_LIB) \

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.1114
diff -r1.1114 configure
482c482
<   Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS)
---
>   Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX)
2339a2340,2351
> echocheck "-lC"
> cat > $TMPC <<EOF
> int main(void) { return 0; }
> EOF
> if cc_check -lC; then
>   _ld_lC="-lC"
>   echores "yes"
> else
>   _ld_lC=""
>   echores "no"
> fi 
> 
7097a7110
> AIX_LIBC_LIB = $_ld_lC

Index: osdep/getch2.c
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/getch2.c,v
retrieving revision 1.21
diff -r1.21 getch2.c
224c224
< #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__)
---
> #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__) || defined(_AIX)
235c235
< #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__)
---
> #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__) || defined(_AIX)
249c249
< #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__)
---
> #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__) || defined(_AIX)


More information about the MPlayer-dev-eng mailing list