i am using CFLAGS="-fast -xtarget=ultraT1 -xarch=sparcvis2 -xcode=pic32 -g -xs -O"
one set of solaris docs i read implied that -xarch=sparcvis2 was equivalent to -xarch=v9 (which used to trigger 64 bit), but looking at the sun studio 12 compiler options, the more specific versions of -xarch (ie. other than -xarch=v9 or v9a or v9b) may no longer imply that the 64 bit memory model should be used. so maybe i need to add a -m64 to the above ?
(compiling on a Sun T2000, with a homegenous build / execute environment, so favouring speed over cpu compatibility is ok)
On Thu, Mar 12, 2009 at 1:31 AM, Aaron Richton richton@nbcs.rutgers.eduwrote:
On Wed, 11 Mar 2009, Brett @Google wrote:
/data/openldap/backups/ldap_090302.ldif: Value too large for defined data
type
man lfcompile, and/or switch to 64-bit binaries?
Well, it doesn't really matter if you get the right output. Check your slapd i.e.:
bash-2.05$ elfdump /usr/bin/sparcv9/ps | grep e_machine e_machine: EM_SPARCV9 e_version: EV_CURRENT bash-2.05$ elfdump /usr/bin/sparcv7/ps | grep e_machine e_machine: EM_SPARC e_version: EV_CURRENT
and make sure you're getting sparcv9 code? And yes, I believe -m64 is the preferred flag for that in Sun Studio 12.
Bugger. Got :
elfdump /usr/local/openldap/libexec/slapd | grep e_machine e_machine: EM_SPARC32PLUS e_version: EV_CURRENT
Re-compiling with -m64 to see what i get..
On Thu, Mar 12, 2009 at 12:07 PM, Aaron Richton richton@nbcs.rutgers.eduwrote:
Well, it doesn't really matter if you get the right output. Check your slapd i.e.:
bash-2.05$ elfdump /usr/bin/sparcv9/ps | grep e_machine e_machine: EM_SPARCV9 e_version: EV_CURRENT bash-2.05$ elfdump /usr/bin/sparcv7/ps | grep e_machine e_machine: EM_SPARC e_version: EV_CURRENT
and make sure you're getting sparcv9 code? And yes, I believe -m64 is the preferred flag for that in Sun Studio 12.
On Thu, Mar 12, 2009 at 11:53 AM, Brett @Google brett.maxfield@gmail.comwrote:
i am using CFLAGS="-fast -xtarget=ultraT1 -xarch=sparcvis2 -xcode=pic32 -g -xs -O"
For posterity, the resulting flags i ended up using for 64 bit sparc, using sun studio 12 (T-2000 hardware) :
CFLAGS="-fast -xtarget=ultraT1 -xarch=sparcvis2 -xcode=pic32 -m64" CXXFLAGS="-fast -xtarget=ultraT1 -xarch=sparcvis2 -xcode=pic32 -m64" CPPFLAGS="-I/usr/local/openldap/include -I/usr/sfw/include" LDFLAGS="-fast -m64 -L/usr/local/openldap/lib -L/usr/sfw/lib/sparcv9 -R/usr/local/openldap/lib -R/usr/sfw/lib/sparcv9"
above compiler options were used for both openldap and for berkeley, using --prefix=/usr/local/openldap configure option
recently, i was getting odd SYSSEGV errors in hdb_find_parent (and make test would not complete any hdb tests) even up to recent versions (openldap versions 2.4.16 - 2.4.19), iff i added any explicit -O option at all (other than that implied by -fast). so i presume compiler optimization was causing issues for either openldap or berkeley, perhaps due to the sun compiler "optimizing" size of types, i have no idea how i would find out the root cause though.
oddly, -fast implies -xO5, which is more optimisation than -O does (-O expands to -xO3) so maybe it's a compiler "feature"
Cheers Brett
openldap-software@openldap.org