From 08089a1b20a1818538670d641242266ed3185814 Mon Sep 17 00:00:00 2001 From: kinichiro Date: Fri, 15 Apr 2016 01:11:19 +0900 Subject: fix cmake on Solaris - add Solaris specific compiler flags and library - merge message when SMALL_TIME_T is true - confirmed on SunOS Release 5.11 Version 11.3 64-bit Solaris i386 --- CMakeLists.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e12909..447c3f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,14 @@ if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT") endif() +if(CMAKE_SYSTEM_NAME MATCHES "SunOS") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=gnu99 -fno-strict-aliasing") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__EXTENSIONS__") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=600") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBSD_COMP") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -m64") +endif() + add_definitions(-DLIBRESSL_INTERNAL) add_definitions(-DOPENSSL_NO_HW_PADLOCK) @@ -202,6 +210,9 @@ endif() if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") set(OPENSSL_LIBS ${OPENSSL_LIBS} pthread) endif() +if(CMAKE_SYSTEM_NAME MATCHES "SunOS") + set(OPENSSL_LIBS ${OPENSSL_LIBS} nsl socket) +endif() if(NOT (CMAKE_SYSTEM_NAME MATCHES "(Darwin|MINGW|CYGWIN)" OR MSVC)) set(BUILD_SHARED true) @@ -210,8 +221,8 @@ endif() check_type_size(time_t SIZEOF_TIME_T) if(SIZEOF_TIME_T STREQUAL "4") set(SMALL_TIME_T true) - message(WARNING " ** Warning, this system is unable to represent times past 2038") - message(WARNING " ** It will behave incorrectly when handling valid RFC5280 dates") + message(WARNING " ** Warning, this system is unable to represent times past 2038\n" + " ** It will behave incorrectly when handling valid RFC5280 dates") endif() add_definitions(-DSIZEOF_TIME_T=${SIZEOF_TIME_T}) -- cgit v1.2.3-55-g6feb