Don't try to use --gc-sections on SunOS

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>
This commit is contained in:
Matthaus Owens 2015-10-26 14:01:22 -07:00 committed by Gunnar Beutner
parent 6004ab6c31
commit 80d63d7e58
1 changed files with 1 additions and 1 deletions

View 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()