From 2e9679c1cb7e48b10a3c84463bb5989a3375d6b3 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Fri, 18 Oct 2019 20:22:38 +0200 Subject: CMake/MSYS2: Link against libssp (required for _FORTIFY_SOURCE) mingw-w64 does not seem to have native support for fortification, libssp offers it, so let's try this for now. Not sure yet if disabling _FORTIFY_SOURCE would be better/worse. See also https://sourceforge.net/p/mingw-w64/mailman/message/36764708/ https://github.com/msys2/MINGW-packages/issues/5803 https://github.com/msys2/MINGW-packages/issues/5868 --- CMakeScripts/DefineDependsandFlags.cmake | 1 + CMakeScripts/InstallMSYS2.cmake | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeScripts') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 9dd7f7785..802117e12 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -74,6 +74,7 @@ if(WIN32) list(APPEND INKSCAPE_LIBS "-lgomp") list(APPEND INKSCAPE_LIBS "-lwinpthread") + list(APPEND INKSCAPE_LIBS "-lssp") # required for support of _FORTIFY_SOURCE with mingw-w64 if(HAVE_MINGW64) list(APPEND INKSCAPE_CXX_FLAGS "-m64") diff --git a/CMakeScripts/InstallMSYS2.cmake b/CMakeScripts/InstallMSYS2.cmake index 3be5bdbd2..e631464b1 100644 --- a/CMakeScripts/InstallMSYS2.cmake +++ b/CMakeScripts/InstallMSYS2.cmake @@ -86,7 +86,6 @@ if(WIN32) ${MINGW_BIN}/libpangomm-1.4-[0-9]*.dll ${MINGW_BIN}/libpangowin32-1.0-[0-9]*.dll ${MINGW_BIN}/libpcre-[0-9]*.dll - ${MINGW_BIN}/libpdcurses.dll ${MINGW_BIN}/libpixman-1-[0-9]*.dll ${MINGW_BIN}/libplc[0-9]*.dll ${MINGW_BIN}/libplds[0-9]*.dll @@ -104,6 +103,7 @@ if(WIN32) ${MINGW_BIN}/libsoup-2.4-[0-9]*.dll ${MINGW_BIN}/libsqlite3-[0-9]*.dll ${MINGW_BIN}/libssl-1_[0-9]*.dll + ${MINGW_BIN}/libssp-[0-9]*.dll ${MINGW_BIN}/libstdc++-[0-9]*.dll ${MINGW_BIN}/libtermcap-[0-9]*.dll ${MINGW_BIN}/libthai-[0-9]*.dll -- cgit v1.2.3