From e42adb884527ae541b48a5e69df133262ae0103b Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Thu, 8 Sep 2022 09:09:41 +0200 Subject: CMake: accept known valid 32 bit host architectures When trying to cross-build from one 32 bit host architecture to another the "Unsupported architecture:" case was hit, in which case the result of get_v8_arch() was empty. This would lead to configure_gn_toolchain() being called with a missing argument, which gave a totally unhelpful error message. Fix this by just accepting valid 32 bit architectures from the internal list, and raise the debug message to a FATAL_ERROR to get immediate feedback. Change-Id: I8e0c757ad13e2acff67827bd9063c493e9d84444 Reviewed-by: Michal Klocek (cherry picked from commit 3995d2fe81ae6affe9e37cc44e077617b9d480b3) --- cmake/Functions.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake index cf921dce8..370ea082c 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -647,8 +647,10 @@ function(get_v8_arch result targetArch hostArch) set(${result} "mipsel" PARENT_SCOPE) elseif(hostArch STREQUAL "mipsel64") set(${result} "mipsel" PARENT_SCOPE) + elseif(hostArch IN_LIST list32) + set(${result} "${hostArch}" PARENT_SCOPE) else() - message(DEBUG "Unsupported architecture: ${hostArch}") + message(FATAL_ERROR "Unsupported architecture: ${hostArch}") endif() else() # assume 64bit target which matches 64bit host -- cgit v1.2.3