From: Gerhard Gappmeier Date: Thu, 8 Nov 2018 17:15:52 +0000 (+0100) Subject: Disable stack protector features when cross compiling X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~430 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ff9bd84c45ce9471c8355be1e9b591322d1b5a1b;p=nextcloud-desktop.git Disable stack protector features when cross compiling When cross-compiling this for remarkable using the poky toolchain this results in linker errors with stack protector: libssp_nonshared.a not found --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b3658c98b..69c9cfde3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,7 +13,7 @@ if(NOT TOKEN_AUTH_ONLY) endif() if(NOT MSVC) - if(NOT (CMAKE_SYSTEM_PROCESSOR MATCHES "^(alpha|parisc|hppa)")) + if(NOT (CMAKE_SYSTEM_PROCESSOR MATCHES "^(alpha|parisc|hppa)") AND NOT CMAKE_CROSSCOMPILING) if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector --param=ssp-buffer-size=4") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector --param=ssp-buffer-size=4")