]> granicus.if.org Git - icinga2/commitdiff
Don't try to use --gc-sections on SunOS
authorMatthaus Owens <matthaus@puppetlabs.com>
Mon, 26 Oct 2015 21:01:22 +0000 (14:01 -0700)
committerGunnar Beutner <gunnar@beutner.name>
Fri, 6 Nov 2015 16:02:32 +0000 (17:02 +0100)
The linker on Solaris pukes on the floor when handed --gc-sections, so this commit adds SunOS to the list of OSes to exclude from this section of CMakery.

fixes #10555

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
CMakeLists.txt

index 3b7865799cdea44316029f5a499f47082fc95988..f84cec362bfcf6b40581e620234a7f174060e244 100644 (file)
@@ -143,7 +143,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
   endif()
 
-  if(NOT CMAKE_SYSTEM_NAME MATCHES AIX AND NOT CMAKE_SYSTEM_NAME MATCHES OpenBSD)
+  if(NOT CMAKE_SYSTEM_NAME MATCHES AIX AND NOT CMAKE_SYSTEM_NAME MATCHES OpenBSD AND NOT CMAKE_SYSTEM_NAME MATCHES SunOS)
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -Wl,--no-export-dynamic -Bsymbolic-functions -Wl,--dynamic-list-cpp-typeinfo -Wl,--dynamic-list-data")
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -Wl,--no-export-dynamic -Bsymbolic-functions -Wl,--dynamic-list-cpp-typeinfo -Wl,--dynamic-list-data")
   endif()