Bug 422894 Firefox 3 failed to start on Solaris SPARC workaround a compiler bug r=ted.mielczarek a=beltzner
authorginn.chen@sun.com
Mon, 17 Mar 2008 23:39:45 -0700
changeset 13216 d5a20c9d98abf7465f6c74992d4d9ca03346d682
parent 13215 226c19197d8d0b7be78246b6f1508ce144ae783b
child 13217 c8f50fef10b4276fb53d2e4cf6a8af68dc323133
push idunknown
push userunknown
push dateunknown
reviewersted.mielczarek, beltzner
bugs422894
milestone1.9b5pre
Bug 422894 Firefox 3 failed to start on Solaris SPARC workaround a compiler bug r=ted.mielczarek a=beltzner
configure.in
--- a/configure.in
+++ b/configure.in
@@ -2345,18 +2345,26 @@ dnl the qsort routine under solaris is f
     SYSTEM_MAKEDEPEND=
     # $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 -z "$GNU_CC"; then
        NS_USE_NATIVE=1
        MOZ_FIX_LINK_PATHS='-R $(LIBXUL_DIST)/bin'
        AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
-       CFLAGS="$CFLAGS -xstrconst -xbuiltin=%all"
-       CXXFLAGS="$CXXFLAGS -xbuiltin=%all -features=tmplife -norunpath"
+
+       if test "$CPU_ARCH" != "sparc"; then
+          CFLAGS="$CFLAGS -xstrconst -xbuiltin=%all"
+          CXXFLAGS="$CXXFLAGS -xbuiltin=%all -features=tmplife -norunpath"
+       else
+          # Do not use -xbuiltin on SPARC to get around a bug of compiler
+          CFLAGS="$CFLAGS -xstrconst -xbuiltin=%none"
+          CXXFLAGS="$CXXFLAGS -xbuiltin=%none -features=tmplife -norunpath"
+       fi
+
        LDFLAGS="-xildoff -z lazyload -z combreloc $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" 
            AC_TRY_LINK([#include <stdio.h>],
                        [printf("Hello World\n");],
                        ,
                        [LDFLAGS=$_SAVE_LDFLAGS])