diff options
author | Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> | 2018-11-08 20:15:52 +0300 |
---|---|---|
committer | Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> | 2018-11-09 13:36:20 +0300 |
commit | 95d2a2fffce905235c52de19db90c766df10c9ba (patch) | |
tree | d3d547fc0be6af30f376cdedb9dd2b4daee9633e /src/CMakeLists.txt | |
parent | e0841e4958f495ffcc244a74ef7d793b34efc5a2 (diff) |
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
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9c9946a75..b1302442a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,7 +15,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") |