Firstly, if you're packaging quite a bit of software.. having this page handy when you're first learning can be invaluable..
http://docs.sun.com/app/docs/doc/819-5265/bjapp?a=view
Here's a real world example of why enable -fast can bite you.. As the sun guys and manual says -fast is a micro option which enables other options.. By adding -# you can see what's explicitly being set.. (look below)
So I had a bugger of a textrel I couldn't find the root cause of.. the symbol ld was referring to was garbage.. It didn't occur to me it could be a compiler bug at first, but all things do come with bugs..
So in the end.. removing -xbuiltin=%all caused the textrel to go away, but the fault or a better work-around hasn't been determined. The sun compiler guys are great and I'm sure they'll let me know what's at the root of this.
----
### Note: NLSPATH =
/opt/SUNWspro/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/SUNWspro/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
### command line files and options (expanded):
### -c -DHAVE_CONFIG_H -DRL_LIBRARY_VERSION=5.2
-D__MATHERR_ERRNO_DONTCARE -D_GNU_SOURCE -fns -nofstore -fsimple=2
-fsingle -I. -I.. -I.. -KPIC -xalias_level=basic -xarch=ssse3 -m64
-xbuiltin=%all -xchip=core2 -xlibmil -xO5 -xregs=no%frameptr -xspace
-xstrconst -i -lc ../bind.c -o bind.o
/opt/SUNWspro/prod/bin/acomp -xldscope=global -i ../bind.c -xir_types
-arrayloc -o /tmp/acompAAA.26891.VEayH0 -r /tmp/acompBAA.26891.WEayH0
-xdbggen=no%stabs+dwarf2+usedonly -DHAVE_CONFIG_H
-DRL_LIBRARY_VERSION=5.2 -D__MATHERR_ERRNO_DONTCARE -D_GNU_SOURCE
-single -I. -I.. -I.. -strconst -fns -xalias_level=basic -2K -m64
-fparam_ir -O5 -Qy -D__SunOS_5_11 -D__SUNPRO_C=0x5100 -D__SVR4 -D__sun
-D__SunOS -D__unix -D__x86_64 -D__x86_64__ -D__amd64 -D__amd64__
-D__BUILTIN_VA_STRUCT -D__C99FEATURES__ -Xa -D__PRAGMA_REDEFINE_EXTNAME
-Dunix -Dsun -D__RESTRICT -xbuiltin=%all -xc99=%all,no%lib
-D__FLT_EVAL_METHOD__=0 -I/opt/SUNWspro/prod/include/cc
"-g/opt/SUNWspro/prod/bin/cc -c -DHAVE_CONFIG_H
-DRL_LIBRARY_VERSION='5.2' -D__MATHERR_ERRNO_DONTCARE -D_GNU_SOURCE -fns
-nofstore -fsimple=2 -fsingle -I. -I.. -I.. -KPIC -xalias_level=basic
-xarch=ssse3 -m64 -xbuiltin=%all -xchip=core2 -xlibmil -xO5
-xregs=no%frameptr -xspace -xstrconst -i -lc -o bind.o " -fsimple=2
-D__SUN_PREFETCH -destination_ir=iropt
/opt/SUNWspro/prod/bin/iropt -F -o /tmp/iroptDAA.26891.YEayH0
-N/tmp/iroptCAA.26891.XEayH0 -is /tmp/acompAAA.26891.VEayH0
/tmp/acompBAA.26891.WEayH0 -xarch=ssse3 -m64 -xcache=generic
-xchip=core2 -fns -fsimple=2 -xprefetch=auto,explicit -xprefetch_level=1
-xvector=no -xbuiltin=%all -xspace -xalias_level=basic -k -O5 -Qy
/opt/SUNWspro/prod/bin/ir2hf -verbose -m64 /tmp/iroptDAA.26891.YEayH0
/tmp/acompAAA.26891.VEayH0 /tmp/iroptEAA.26891.ZEayH0
/opt/SUNWspro/prod/bin/fbe -O5 -xbuiltin -Qy
/opt/SUNWspro/prod/bin/ube -iropt -verbose -O5 -Z~B -xalias_level=basic
-xbuiltin -fsimple=2 -fsr=1 -xprefetch=auto,explicit -xprefetch_level=1
-fbe /opt/SUNWspro/prod/bin/fbe -il /opt/SUNWspro/prod/lib/amd64/libm.il
-PIC -m64 -xarch=ssse3 -xcache=generic -xchip=core2 -xspace -xvector=no
-xthreadvar=dynamic -Qy -comdat -ipo bind.o -S
/tmp/ube_sGAA.26891.0EayH0 /tmp/iroptEAA.26891.ZEayH0
/opt/SUNWspro/prod/bin/fbe -xarch=amd64 -xchip=core2 -o bind.o -Qy
/tmp/ube_sGAA.26891.0EayH0
Text relocation remains referenced
against symbol offset in file
.CG68.2305 0x8ac bind.so
ld: fatal: relocations remain against allocatable but non-writable sections