Use the following compile and link switches when building shared libraries on AIX.
compile switches
-q64 -qarch=ppc64 -qtbtable=full -qsrcmsg -qalign=natural -qnoansialias -qmaxmem=-1 -qenum=int -qhalt=e -qflag=w -qthreaded -qxflags=NLOOPING -qtmplinst=none -qthreaded
link switches
-brtl -G -lg -lpthreads_compat -lpthreads -lm_r -ldl -bnolibpath -v