Bug 574639 Several fixes for configure.in and rules.mk for Solaris r=bsmedberg

This commit is contained in:
Ginn Chen 2010-06-27 00:56:07 +08:00
parent 271f0b4b44
commit 313e182b81
4 changed files with 72 additions and 58 deletions

View File

@ -355,7 +355,6 @@ endif # ENABLE_CXX_EXCEPTIONS
endif # WINNT
ifeq ($(SOLARIS_SUNPRO_CXX),1)
CXXFLAGS += -features=extensions -D__FUNCTION__=__func__
ifeq (86,$(findstring 86,$(OS_TEST)))
OS_LDFLAGS += -M $(topsrcdir)/config/solaris_ia32.map
endif # x86

View File

@ -1604,15 +1604,6 @@ if test "$GNU_CC"; then
_DEFINES_CFLAGS='-include $(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT'
_USE_CPP_INCLUDE_FLAG=1
elif test "$SOLARIS_SUNPRO_CC"; then
MKSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
DSO_LDOPTS='-shared'
if test "$GNU_LD"; then
# Don't allow undefined symbols in libraries
DSO_LDOPTS="$DSO_LDOPTS -z defs"
fi
DSO_CFLAGS=''
if test "$CPU_ARCH" = "sparc"; then
# for Sun Studio on Solaris/SPARC
@ -2722,19 +2713,19 @@ alpha*-*-osf*)
AC_DEFINE(SOLARIS)
TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"'
SYSTEM_MAKEDEPEND=
MOZ_FIX_LINK_PATHS=
# $ORIGIN/.. is for shared libraries under components/ to locate shared
# libraries one level up (e.g. libnspr4.so)
LDFLAGS="$LDFLAGS -z ignore -R '\$\$ORIGIN:\$\$ORIGIN/..'"
if test "$SOLARIS_SUNPRO_CC"; then
LIBS="-lCrun -lCstd $LIBS"
LDFLAGS="$LDFLAGS -z ignore -R '\$\$ORIGIN:\$\$ORIGIN/..' -z lazyload -z combreloc -z muldefs"
LIBS="-lCrun -lCstd -lc $LIBS"
NS_USE_NATIVE=1
MOZ_FIX_LINK_PATHS=
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all"
CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic -norunpath"
CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__"
CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions -norunpath -D__FUNCTION__=__func__"
_MOZ_EXCEPTIONS_FLAGS_ON='-features=except'
_MOZ_EXCEPTIONS_FLAGS_OFF='-features=no%except'
LDFLAGS="-xildoff -z lazyload -z combreloc $LDFLAGS"
LDFLAGS="-xildoff $LDFLAGS"
if test -z "$CROSS_COMPILE" && test -f /usr/lib/ld/map.noexstk; then
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="-M /usr/lib/ld/map.noexstk $LDFLAGS"
@ -2746,10 +2737,10 @@ alpha*-*-osf*)
WARNINGS_AS_ERRORS='-Werror'
MOZ_OPTIMIZE_FLAGS="-xO4"
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -h $@ -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) -G -z muldefs -h $@ -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) -$(DSO_LDOPTS) -h $@ -o $@'
MKSHLIB_FORCE_ALL='-z allextract'
MKSHLIB_UNFORCE_ALL='-z defaultextract'
DSO_LDOPTS='-G -z muldefs'
DSO_LDOPTS='-G'
AR_LIST="$AR t"
AR_EXTRACT="$AR x"
AR_DELETE="$AR d"
@ -2769,25 +2760,38 @@ alpha*-*-osf*)
#error "Denied"
#endif],
_BAD_COMPILER=,_BAD_COMPILER=1)
if test -n "$_BAD_COMPILER"; then
_res="no"
AC_MSG_ERROR([Sun C++ 5.9 (Sun Studio 12) or higher is required to build. Your compiler version is $CXX_VERSION .])
else
_res="yes"
fi
AC_MSG_RESULT([$_res])
AC_LANG_RESTORE
if test -n "$_BAD_COMPILER"; then
_res="no"
AC_MSG_ERROR([Sun C++ 5.9 (Sun Studio 12) or higher is required to build. Your compiler version is $CXX_VERSION .])
else
_res="yes"
fi
AC_TRY_COMPILE([],
[#if (__SUNPRO_CC >= 0x5100)
#error "Sun C++ 5.10 or above"
#endif],
_ABOVE_SS12U1=,_ABOVE_SS12U1=1)
if test "$_ABOVE_SS12U1"; then
# disable xannotate
CXXFLAGS="$CXXFLAGS -xannotate=no"
fi
AC_MSG_RESULT([$_res])
AC_LANG_RESTORE
else
LDFLAGS="$LDFLAGS -Wl,-z,ignore -Wl,-R,'\$\$ORIGIN:\$\$ORIGIN/..' -Wl,-z,lazyload -Wl,-z,combreloc -Wl,-z,muldefs"
LIBS="-lc $LIBS"
MKSHLIB_FORCE_ALL='-Wl,-z -Wl,allextract'
MKSHLIB_UNFORCE_ALL='-Wl,-z -Wl,defaultextract'
ASFLAGS="$ASFLAGS -fPIC"
DSO_LDOPTS='-G'
DSO_LDOPTS='-shared'
_WARNINGS_CFLAGS=''
_WARNINGS_CXXFLAGS=''
if test "$OS_RELEASE" = "5.3"; then
AC_DEFINE(MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES)
AC_DEFINE(MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES)
fi
fi
if test "$OS_RELEASE" = "5.5.1"; then
AC_DEFINE(NEED_USLEEP_PROTOTYPE)
AC_DEFINE(NEED_USLEEP_PROTOTYPE)
fi
;;
@ -5937,6 +5941,14 @@ if test -n "$MOZ_WEBM"; then
VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
VPX_X86_ASM=1
;;
SunOS:i?86)
VPX_ASFLAGS="-f elf32 -rnasm -pnasm"
VPX_X86_ASM=1
;;
SunOS:x86_64)
VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
VPX_X86_ASM=1
;;
Darwin:i?86)
VPX_ASFLAGS="-f macho32 -rnasm -pnasm -DPIC"
VPX_X86_ASM=1

View File

@ -355,7 +355,6 @@ endif # ENABLE_CXX_EXCEPTIONS
endif # WINNT
ifeq ($(SOLARIS_SUNPRO_CXX),1)
CXXFLAGS += -features=extensions -D__FUNCTION__=__func__
ifeq (86,$(findstring 86,$(OS_TEST)))
OS_LDFLAGS += -M $(topsrcdir)/config/solaris_ia32.map
endif # x86

View File

@ -1341,15 +1341,6 @@ if test "$GNU_CC"; then
_DEFINES_CFLAGS='-include $(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT'
_USE_CPP_INCLUDE_FLAG=1
elif test "$SOLARIS_SUNPRO_CC"; then
MKSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
DSO_LDOPTS='-shared'
if test "$GNU_LD"; then
# Don't allow undefined symbols in libraries
DSO_LDOPTS="$DSO_LDOPTS -z defs"
fi
DSO_CFLAGS=''
if test "$CPU_ARCH" = "sparc"; then
# for Sun Studio on Solaris/SPARC
@ -2413,19 +2404,19 @@ alpha*-*-osf*)
NO_NSPR_CONFIG_SYSTEM_VERSION=["`pkgparam SUNWpr SUNW_PRODVERS | sed -e 's/^[1-9][0-9]*\.[0-9][0-9]*$/&.0/'`"]
fi
SYSTEM_MAKEDEPEND=
MOZ_FIX_LINK_PATHS=
# $ORIGIN/.. is for shared libraries under components/ to locate shared
# libraries one level up (e.g. libnspr4.so)
LDFLAGS="$LDFLAGS -z ignore -R '\$\$ORIGIN:\$\$ORIGIN/..'"
if test "$SOLARIS_SUNPRO_CC"; then
LIBS="-lCrun -lCstd $LIBS"
LDFLAGS="$LDFLAGS -z ignore -R '\$\$ORIGIN:\$\$ORIGIN/..' -z lazyload -z combreloc -z muldefs"
LIBS="-lCrun -lCstd -lc $LIBS"
NS_USE_NATIVE=1
MOZ_FIX_LINK_PATHS=
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all"
CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic -norunpath"
CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__"
CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions -norunpath -D__FUNCTION__=__func__"
_MOZ_EXCEPTIONS_FLAGS_ON='-features=except'
_MOZ_EXCEPTIONS_FLAGS_OFF='-features=no%except'
LDFLAGS="-xildoff -z lazyload -z combreloc $LDFLAGS"
LDFLAGS="-xildoff $LDFLAGS"
if test -z "$CROSS_COMPILE" && test -f /usr/lib/ld/map.noexstk; then
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="-M /usr/lib/ld/map.noexstk $LDFLAGS"
@ -2437,10 +2428,10 @@ alpha*-*-osf*)
WARNINGS_AS_ERRORS='-Werror'
MOZ_OPTIMIZE_FLAGS="-xO4"
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -h $@ -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) -G -z muldefs -h $@ -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) -$(DSO_LDOPTS) -h $@ -o $@'
MKSHLIB_FORCE_ALL='-z allextract'
MKSHLIB_UNFORCE_ALL='-z defaultextract'
DSO_LDOPTS='-G -z muldefs'
DSO_LDOPTS='-G'
AR_LIST="$AR t"
AR_EXTRACT="$AR x"
AR_DELETE="$AR d"
@ -2460,25 +2451,38 @@ alpha*-*-osf*)
#error "Denied"
#endif],
_BAD_COMPILER=,_BAD_COMPILER=1)
if test -n "$_BAD_COMPILER"; then
_res="no"
AC_MSG_ERROR([Sun C++ 5.9 (Sun Studio 12) or higher is required to build. Your compiler version is $CXX_VERSION .])
else
_res="yes"
fi
AC_MSG_RESULT([$_res])
AC_LANG_RESTORE
if test -n "$_BAD_COMPILER"; then
_res="no"
AC_MSG_ERROR([Sun C++ 5.9 (Sun Studio 12) or higher is required to build. Your compiler version is $CXX_VERSION .])
else
_res="yes"
fi
AC_TRY_COMPILE([],
[#if (__SUNPRO_CC >= 0x5100)
#error "Sun C++ 5.10 or above"
#endif],
_ABOVE_SS12U1=,_ABOVE_SS12U1=1)
if test "$_ABOVE_SS12U1"; then
# disable xannotate
CXXFLAGS="$CXXFLAGS -xannotate=no"
fi
AC_MSG_RESULT([$_res])
AC_LANG_RESTORE
else
LDFLAGS="$LDFLAGS -Wl,-z,ignore -Wl,-R,'\$\$ORIGIN:\$\$ORIGIN/..' -Wl,-z,lazyload -Wl,-z,combreloc -Wl,-z,muldefs"
LIBS="-lc $LIBS"
MKSHLIB_FORCE_ALL='-Wl,-z -Wl,allextract'
MKSHLIB_UNFORCE_ALL='-Wl,-z -Wl,defaultextract'
ASFLAGS="$ASFLAGS -fPIC"
DSO_LDOPTS='-G'
DSO_LDOPTS='-shared'
_WARNINGS_CFLAGS=''
_WARNINGS_CXXFLAGS=''
if test "$OS_RELEASE" = "5.3"; then
AC_DEFINE(MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES)
AC_DEFINE(MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES)
fi
fi
if test "$OS_RELEASE" = "5.5.1"; then
AC_DEFINE(NEED_USLEEP_PROTOTYPE)
AC_DEFINE(NEED_USLEEP_PROTOTYPE)
fi
;;