--- td-1.6.0/CMakeLists.txt.orig +++ td-1.6.0/CMakeLists.txt @@ -173,7 +173,7 @@ else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -Wl,--exclude-libs,ALL") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,ignore") endif() if (MEMPROF) @@ -199,6 +199,10 @@ add_definitions(-D_FILE_OFFSET_BITS=64) endif() +if (CMAKE_SYSTEM_NAME STREQUAL "SunOS") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lsocket -lnsl") +endif() + include(AddCXXCompilerFlag) if (NOT MSVC) add_cxx_compiler_flag("-Wall")