diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d34850a..de476254 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -ggdb3 -fno-inline") SET(CMAKE_CXX_FLAGS_RELEASE "-O2") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -g -fno-inline") + SET(CMAKE_CXX_LINK_FLAGS "-rdynamic -static-libgcc -static-libstdc++ -Wl,--as-needed") ENDIF(CMAKE_COMPILER_IS_GNUCXX) @@ -189,7 +190,6 @@ IF(WIN32) -o ${CMAKE_CURRENT_BINARY_DIR}/icon.o) SET(SOURCES ${SOURCES} icon.o) ELSE(WIN32) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic") SET(ADDITIONAL_LIBRARIES -lpthread) SET(SOURCES ${SOURCES} src/framework/platform/x11platform.cpp) ENDIF(WIN32) diff --git a/cmake/i486-mingw32_toolchain.cmake b/cmake/i486-mingw32_toolchain.cmake index 434243a2..45e3467d 100644 --- a/cmake/i486-mingw32_toolchain.cmake +++ b/cmake/i486-mingw32_toolchain.cmake @@ -5,5 +5,4 @@ SET(CMAKE_RC_COMPILER i486-mingw32-windres) SET(CMAKE_FIND_ROOT_PATH /usr/i486-mingw32) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-libgcc -static-libstdc++") \ No newline at end of file +SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file