$NetBSD: patch-CMakeLists.txt,v 1.1 2014/02/21 20:25:27 joerg Exp $ --- CMakeLists.txt.orig 2013-12-02 20:48:13.000000000 +0000 +++ CMakeLists.txt @@ -11,14 +11,11 @@ if (NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno -fno-exceptions") if (NOT CMAKE_CXX_COMPILER MATCHES "clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math") + set(CMAKE_LD_FLAGS "-fwhole-program") endif (NOT CMAKE_CXX_COMPILER MATCHES "clang") - set(CMAKE_LD_FLAGS "-fwhole-program") endif (NOT MSVC) -if (CMAKE_CXX_COMPILER MATCHES "clang") - # clang needs lstdc++ linked explicitly: - set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -lstdc++") -elseif () +if (NOT CMAKE_CXX_COMPILER MATCHES "clang") # assume gcc: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-enforce-eh-specs") endif ()