[Webkit-unassigned] [Bug 232623] New: [cmake] Check "cortex" string in the CMAKE_SYSTEM_PROCESSOR for defining WTF_CPU_* vars
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 2 07:12:45 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=232623
Bug ID: 232623
Summary: [cmake] Check "cortex" string in the
CMAKE_SYSTEM_PROCESSOR for defining WTF_CPU_* vars
Product: WebKit
Version: WebKit Nightly Build
Hardware: Other
OS: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: CMake
Assignee: webkit-unassigned at lists.webkit.org
Reporter: psaavedra at igalia.com
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)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211102/fb29da22/attachment.htm>
More information about the webkit-unassigned
mailing list