sunstudio

What repository needs to be enabled for Sun Studio 12.5?

亡梦爱人 提交于 2020-01-06 19:47:28
问题 We are part of the Oracle OTN Network. Oracle Solaris Studio publisher is installed (enabled?) and allows us to support up to Sun Studio 12.4. We want to add support for Sun Studio 12.5 for the next release. We tried to install Sun Studio 12.5 following the 12.4 instructions, but we are not finding it: $ pkg list -af 'pkg://solarisstudio/developer/solarisstudio-125/*' pkg list: no packages matching 'pkg://solarisstudio/developer/solarisstudio-125/*' known $ pkg search solarisstudio | grep 125

How to swap two __m128i variables in C++03 given its an opaque type and an array?

♀尐吖头ヾ 提交于 2019-12-30 10:38:08
问题 What is the best practice for swapping __m128i variables? The background is a compile error under Sun Studio 12.2, which is a C++03 compiler. __m128i is an opaque type used with MMX and SSE instructions, and its usually and unsigned long long[2] . C++03 does not provide the support for swapping arrays, and std:swap(__m128i a, __m128i b) fails under the compiler. Here are some related questions that don't quite hit the mark. They don't apply because std::vector is not available. How can we

Error: Cannot use vector unsigned long long[2] to initialize vector unsigned long long[2]

对着背影说爱祢 提交于 2019-12-25 03:58:29
问题 We are testing under Sun Studio 12.3. We are catching a compiler error that's not present under 12.4 and later. Its not present under 12.1 and earlier, but that's because the compiler has trouble with AES instructions. Its also not present under other compilers, like Clang, GCC, ICPC and VC++. The error is: /opt/solarisstudio12.3/bin/CC -DDEBUG -g3 -xO0 -D__SSE2__ -D__SSE3__ -D__SSSE3__ \ -D__SSE4_1__ -D__SSE4_2__ -D__AES__ -D__PCLMUL__ -D__RDRND__ -D__RDSEED__ -D__AVX__ \ -D__AVX2__ -D__BMI_

Detect -xarch option in the preprocessor?

十年热恋 提交于 2019-12-23 22:22:56
问题 I'm using Sun Studio 12.4 and 12.5 on Solaris 11. We have a source file that provides a straight C/C++ implementation of CRC32, or an optimized version of CRC32 using Intel intrinsics. At runtime, a function pointer is populated with the proper implementation. Testing on a x86 server with dual Xeon's is producing the following because we are making code paths available based on compiler versions. SunCC 12.1 added support for SSE4 (if I parsed the matrix properly), so we attempt to enable it

Building Boost on Solaris

我的梦境 提交于 2019-12-22 07:48:10
问题 Will Boost build in entirety on Solaris? I'd like to know if anyone has success with this (specifically Proto/Spirit) before I go and pay for a support contract to patch Sun Studio 12.2 to the latest. I get a few errors and some look to have been resolved in patches, but it's not cheap to pay Oracle for support so I'd rather some hope that it will work before I do. Right now, I'm just trying to use cpp-netlib on Solaris and decode some JSON fetched over HTTP using Boost Property Tree. It

Mixing PIC and non-PIC objects in a shared library

*爱你&永不变心* 提交于 2019-12-21 05:05:05
问题 This question is related to this one as well as its answer. I just discovered some ugliness in a build I'm working on. The situation looks somewhat like the following (written in gmake format); note, this specifically applies to a 32-bit memory model on sparc and x86 hardware: OBJ_SET1 := some objects OBJ_SET2 := some objects # note: OBJ_SET2 doesn't get this flag ${OBJ_SET1} : CCFLAGS += -PIC ${OBJ_SET1} ${OBJ_SET2} : %.o : %.cc ${CCC} ${CCFLAGS} -m32 -o ${@} -c ${<} obj1.o : ${OBJ_SET1}

SunStudio C++ compiler pragma to disable warnings?

半城伤御伤魂 提交于 2019-12-20 02:42:05
问题 The STLport bundled with the SunStudio11 generates alot of warnings. I beleive most compilers have a way to disable warnings from certain source files, like this: Sun C #pragma error_messages off #include <header.h> // ... #pragma error_messages on gcc #pragma warning(push, 0) #include <header.h> // ... #pragma warning(pop) How do you do this in the SunStudio C++ compiler? (btw, the sunstudio C pragmas don't work in sunstudio C++) 回答1: In SunStudio 12, the #pragma error_messages work as

Sun Studio linking gcc libs: exceptions do not work

妖精的绣舞 提交于 2019-12-18 06:23:19
问题 I need to build an application with Sun Studio. This application uses a shared library which can only be build with Gnu C++. The shared lib has a C Interface, so that the code is callable by the Sun Compiler (this is to avoid name mangling issues, see also this question). Everything besides exception handling works fine. When an exception is thrown in the shared library, the program segfaults. This happens only when the main program is compiled using the Sun Studio Compiler. Compiling the

ube error: _mm_aeskeygenassist_si128 intrinsic requires at least -xarch=aes

橙三吉。 提交于 2019-12-13 15:39:57
问题 I'm working under Sun Studio 12.3 on SunOS 5.11 (Solaris 11.3). Its providing a compile error that I don't quite understand: $ /opt/solarisstudio12.3/bin/CC -xarch=sse2 -xarch=aes -xarch=sse4_2 -c test.cxx "test.cxx", line 11: ube: error: _mm_aeskeygenassist_si128 intrinsic requires at least -xarch=aes. CC: ube failed for test.cxx Adding -m64 produces the same error. There's not much to the test program. It simply exercises a SSE2 intrinsic, and an AES intrinsic: $ cat test.cxx #include

How to silence 'The last statement should return a value' warning?

家住魔仙堡 提交于 2019-12-13 13:53:10
问题 Sun Studio 12.1 prints the warning Warning: The last statement should return a value. frequently for functions like that: int f() { /* some code that may return */ // if we end up here, something is broken throw std::runtime_error("Error ..."); } It is perfectly clear that we do not need a return value at the end of the function. I hesitate to insert something like // Silence a compiler warning return 42; at the end of such a function, since it is dead code anyway. For more complicated return