From 0e50a41922739bdede7200bc9e8103328cb3e7cc Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 9 Oct 2018 09:36:42 +0200 Subject: Fix build of OpenSSL on Android (#4427) When passing on CMAKE__COMPILER_TARGET and CMAKE__COMPILER_EXTERNAL_TOOLCHAIN it is important that the selection of those via CMAKE_C_COMPILE_OPTIONS_TARGET/EXTERNAL_TOOLCHAIN is done without a space inbetween. For example COMPILE_OPTIONS_TARGET is with clang a simple --target= and so the selected target must follow without a space, so that we get --target=foo-bar instead of --target= foo bar, which the compiler does not parse as intended. --- ports/openssl-unix/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/openssl-unix/CMakeLists.txt b/ports/openssl-unix/CMakeLists.txt index fd5964506..71c2646ab 100644 --- a/ports/openssl-unix/CMakeLists.txt +++ b/ports/openssl-unix/CMakeLists.txt @@ -36,10 +36,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}") endif() if(CMAKE_C_COMPILER_TARGET) - set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET} ${CMAKE_C_COMPILER_TARGET}") + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}") endif() if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN) - set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}") + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}") endif() if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT) set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") -- cgit v1.2.3