[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: solaris compile options

On Thu, Mar 12, 2009 at 11:53 AM, Brett @Google <brett.maxfield@gmail.com> wrote:
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"