Added -xmemalign=4i compiler option for Sparc's.

pull/405/head
Anton Gorev 2017-04-27 14:15:12 -05:00
parent 1df5fc1e21
commit 7eeab3d0bf
1 changed files with 6 additions and 3 deletions

View File

@ -262,9 +262,12 @@ if ((NOT CRYPTOPP_CROSS_COMPILE) AND "${UNAME_SYSTEM}" STREQUAL "SunOS")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -template=no%extdef")
endif()
# Try this if you are encountering unexplained SIGBUS'es on SPARC
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xmemalign=4i")
execute_process(COMMAND "uname" "-p" OUTPUT_VARIABLE PLATFORM_SUNOS_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
string(TOUPPER "${PLATFORM_SUNOS_ARCH}" PLATFORM_SUNOS_ARCH)
message(STATUS "SunOS platform arch: ${PLATFORM_SUNOS_ARCH}")
if (${PLATFORM_SUNOS_ARCH} MATCHES SPARC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xmemalign=4i")
endif ()
endif()
# Link is driven through the compiler, but CXXFLAGS are not used. Also see