diff --git a/config/rules.mk b/config/rules.mk index 7c826dbe24b4..2c38fe37b0ee 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -362,6 +362,9 @@ 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 endif # Solaris Sun Studio C++ ifeq (,$(filter-out WINNT WINCE,$(HOST_OS_ARCH))) diff --git a/config/solaris_ia32.map b/config/solaris_ia32.map new file mode 100644 index 000000000000..712b2d8f6240 --- /dev/null +++ b/config/solaris_ia32.map @@ -0,0 +1 @@ +hwcap_1 = OVERRIDE; diff --git a/gfx/qcms/Makefile.in b/gfx/qcms/Makefile.in index c79a4d900cd8..8dc847fd9f97 100644 --- a/gfx/qcms/Makefile.in +++ b/gfx/qcms/Makefile.in @@ -20,11 +20,16 @@ ifeq (86,$(findstring 86,$(OS_TEST))) ifdef GNU_CC SSE1_FLAGS=-msse SSE2_FLAGS=-msse2 +else +ifeq ($(SOLARIS_SUNPRO_CC),1) + SSE1_FLAGS=-xarch=sse + SSE2_FLAGS=-xarch=sse2 else SSE1_FLAGS= SSE2_FLAGS= endif endif +endif FORCE_STATIC_LIB = 1 # This library is used by other shared libs diff --git a/gfx/qcms/transform.c b/gfx/qcms/transform.c index d9fd0897e616..7a6cbd21af34 100644 --- a/gfx/qcms/transform.c +++ b/gfx/qcms/transform.c @@ -25,10 +25,10 @@ #include #include "qcmsint.h" -/* for MSVC, GCC, and Intel compilers */ -#if defined(_M_IX86) || defined(__i386__) || defined(_M_AMD64) || defined(__x86_64__) +/* for MSVC, GCC, Intel, and Sun compilers */ +#if defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64) #define X86 -#endif /* _M_IX86 || __i386__ || _M_AMD64 || __x86_64__ */ +#endif /* _M_IX86 || __i386__ || __i386 || _M_AMD64 || __x86_64__ || __x86_64 */ //XXX: could use a bettername typedef uint16_t uint16_fract_t; @@ -1062,7 +1062,7 @@ static void cpuid(uint32_t fxn, uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *c = c_; *d = d_; } -#elif defined(__GNUC__) && defined(__i386__) +#elif (defined(__GNUC__) || defined(__SUNPRO_C)) && (defined(__i386__) || defined(__i386)) #define HAS_CPUID /* Get us a CPUID function. We can't use ebx because it's the PIC register on some platforms, so we use ESI instead and save ebx to avoid clobbering it. */ @@ -1088,7 +1088,7 @@ static void cpuid(uint32_t fxn, uint32_t *a, uint32_t *b, uint32_t *c, uint32_t static int sse_version_available(void) { -#if defined(__x86_64__) || defined(_M_AMD64) +#if defined(__x86_64__) || defined(__x86_64) || defined(_M_AMD64) /* we know at build time that 64-bit CPUs always have SSE2 * this tells the compiler that non-SSE2 branches will never be * taken (i.e. OK to optimze away the SSE1 and non-SIMD code */ diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index 7c826dbe24b4..2c38fe37b0ee 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -362,6 +362,9 @@ 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 endif # Solaris Sun Studio C++ ifeq (,$(filter-out WINNT WINCE,$(HOST_OS_ARCH))) diff --git a/js/src/config/solaris_ia32.map b/js/src/config/solaris_ia32.map new file mode 100644 index 000000000000..712b2d8f6240 --- /dev/null +++ b/js/src/config/solaris_ia32.map @@ -0,0 +1 @@ +hwcap_1 = OVERRIDE;