diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-09-26 16:53:29 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-09-26 16:53:29 +0200 |
commit | 3d74c3802ed6960f6f1a6a5d676b0027bd385339 (patch) | |
tree | afe25a1283d09520b4fdc13e7d787e61b3a8c8f7 | |
parent | 667fb5f9a9c96f210583dbfb11755c43250c5e55 (diff) | |
download | libssh-3d74c3802ed6960f6f1a6a5d676b0027bd385339.tar.gz libssh-3d74c3802ed6960f6f1a6a5d676b0027bd385339.tar.xz libssh-3d74c3802ed6960f6f1a6a5d676b0027bd385339.zip |
cmake: Also add DEFAULT_LINK_FLAGS for Solaris
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | CompilerChecks.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake index 4d5ef027..be428dc2 100644 --- a/CompilerChecks.cmake +++ b/CompilerChecks.cmake @@ -65,10 +65,18 @@ if (UNIX) check_c_compiler_flag_ssp("-fstack-protector-strong" WITH_STACK_PROTECTOR_STRONG) if (WITH_STACK_PROTECTOR_STRONG) list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-protector-strong") + # This is needed as Solaris has a seperate libssp + if (SOLARIS) + list(APPEND SUPPORTED_LINKER_FLAGS "-fstack-protector-strong") + endif() else (WITH_STACK_PROTECTOR_STRONG) check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR) if (WITH_STACK_PROTECTOR) list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-protector") + # This is needed as Solaris has a seperate libssp + if (SOLARIS) + list(APPEND SUPPORTED_LINKER_FLAGS "-fstack-protector") + endif() endif() endif (WITH_STACK_PROTECTOR_STRONG) @@ -100,3 +108,4 @@ if (OSX) endif() set(DEFAULT_C_COMPILE_FLAGS ${SUPPORTED_COMPILER_FLAGS} CACHE INTERNAL "Default C Compiler Flags" FORCE) +set(DEFAULT_LINK_FLAGS ${SUPPORTED_LINKER_FLAGS} CACHE INTERNAL "Default C Linker Flags" FORCE) |