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
This commit is contained in:
Gerhard Gappmeier 2018-11-08 18:15:52 +01:00 committed by Kevin Ottens
parent 6aead6425e
commit ff9bd84c45
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -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")