Bug 550154: PGO build issue on Solaris SPARC r=ted.mielczarek

This commit is contained in:
Ginn Chen 2010-03-08 17:35:41 +08:00
parent a152895374
commit 350ebe7936
3 changed files with 12 additions and 18 deletions

View File

@ -7390,13 +7390,8 @@ dnl Sun Studio on Solaris
if test "$SOLARIS_SUNPRO_CC"; then
PROFILE_GEN_CFLAGS="-xprofile=collect:$_objdir/$enable_application"
PROFILE_GEN_LDFLAGS="-xprofile=collect:$_objdir/$enable_application"
if test "$CPU_ARCH" != "sparc"; then
PROFILE_USE_CFLAGS="-xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xprofile=use:$_objdir/$enable_application"
else
PROFILE_USE_CFLAGS="-xlinkopt=2 -xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xlinkopt=2 -xprofile=use:$_objdir/$enable_application"
fi
PROFILE_USE_CFLAGS="-xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xprofile=use:$_objdir/$enable_application"
fi
AC_SUBST(PROFILE_GEN_CFLAGS)

View File

@ -4531,13 +4531,8 @@ dnl Sun Studio on Solaris
if test "$SOLARIS_SUNPRO_CC"; then
PROFILE_GEN_CFLAGS="-xprofile=collect:$_objdir/$enable_application"
PROFILE_GEN_LDFLAGS="-xprofile=collect:$_objdir/$enable_application"
if test "$CPU_ARCH" != "sparc"; then
PROFILE_USE_CFLAGS="-xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xprofile=use:$_objdir/$enable_application"
else
PROFILE_USE_CFLAGS="-xlinkopt=2 -xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xlinkopt=2 -xprofile=use:$_objdir/$enable_application"
fi
PROFILE_USE_CFLAGS="-xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xprofile=use:$_objdir/$enable_application"
fi
AC_SUBST(PROFILE_GEN_CFLAGS)

View File

@ -55,6 +55,14 @@ CPPSRCS = $(error XPTCall not implemented on this platform!)
# Force use of PIC
FORCE_USE_PIC = 1
ifeq ($(OS_ARCH),SunOS)
ifneq (86,$(findstring 86,$(OS_TEST)))
# disable PGO for this directory with Sun Studio on SPARC because
# compiling with xprofile=collect will insert code into nsXPTCStubBase::Stub##n
NO_PROFILE_GUIDED_OPTIMIZE = 1
endif
endif
include $(topsrcdir)/config/config.mk
######################################################################
@ -435,10 +443,6 @@ ASFILES := xptcinvoke_asm_sparc_solaris_GCC.s xptcstubs_asm_sparc_solaris.s
endif
else
# disable PGO for this directory with Sun Studio on SPARC
# because compiling with xprofile=collect will insert code into nsXPTCStubBase::Stub##n
NO_PROFILE_GUIDED_OPTIMIZE = 1
ifdef HAVE_64BIT_OS
ASFILES := xptcinvoke_asm_sparcv9_solaris_SUNW.s xptcstubs_asm_sparcv9_solaris.s
else