In a native build, in systems with uname support, the CMAKE_SYSTEM_PROCESSOR was defined as the output of `uname -p` by default. That was true in cmake 3.0 [1]. In newer versions of CMake the documentation of this variable changed for highlighting that this variable has not to correspond with the target architecture [2]. For example, lately, in toolchains generated by Yocto it is very common to see the CMAKE_SYSTEM_PROCESSOR defined using the GCC [3] tune name for compiling the target. Ex: cortexa7t2hf-neon-vfpv4 (rpi3) cortexa9t2hf-neon-vfpv4 (Freescale iMX6q) ... This change add an additional check to evaluate if the system processor is ARM or ARM64 based on the existence of "cortex" in the string. [1] https://cmake.org/cmake/help/v3.0/variable/CMAKE_SYSTEM_PROCESSOR.html The name of the CPU CMake is building for. On systems that support uname, this variable is set to the output of uname -p, on windows it is set to the value of the environment variable PROCESSOR_ARCHITECTURE [2] https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html When not cross-compiling, this variable has the same value as the CMAKE_HOST_SYSTEM_PROCESSOR variable. In many cases, this will correspond to the target architecture for the build, but this is not guaranteed. (E.g. on Windows, the host may be AMD64 even when using a MSVC cl compiler with a 32-bit target.) When cross-compiling, a CMAKE_TOOLCHAIN_FILE should set the CMAKE_SYSTEM_PROCESSOR variable to match target architecture that it specifies (via CMAKE_<LANG>_COMPILER and perhaps CMAKE_<LANG>_COMPILER_TARGET). [3] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html (See: -mtune=name)
Created attachment 443085 [details] patch
Created attachment 443092 [details] patch
Comment on attachment 443092 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=443092&action=review > Source/cmake/WebKitCommon.cmake:89 > + if (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(^aarch64|^arm64|^cortex-?[am][2-7][2-7])") Maybe is better to use "cortex-?[am][2-7][2-8]" so it matches also Cortex-A78: https://en.wikipedia.org/wiki/ARM_Cortex-A#External_links
(In reply to Carlos Alberto Lopez Perez from comment #3) > Comment on attachment 443092 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=443092&action=review > > > Source/cmake/WebKitCommon.cmake:89 > > + if (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(^aarch64|^arm64|^cortex-?[am][2-7][2-7])") > > Maybe is better to use "cortex-?[am][2-7][2-8]" so it matches also > Cortex-A78: https://en.wikipedia.org/wiki/ARM_Cortex-A#External_links yes. Good point.
Created attachment 443127 [details] patch
Committed r285201 (243827@main): <https://commits.webkit.org/243827@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 443127 [details].