Skip to contentSkip to conversation

webkitgtk: Fix build on aarch64

PATCH Superseded Khem Raj 1 participant 1 message Mar 16, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 webkitgtk: Fix build on aarch64

Do not try to do runtime tests during cross compile Fixes

| CMake Error at Source/cmake/OptionsCommon.cmake:73 (math):
|   math cannot parse the expression: "-1": syntax error, unexpected exp_MINUS,
|   expecting exp_OPENPARENT or exp_NUMBER (1)
---
 meta/recipes-sato/webkit/files/cross-compile.patch | 23 ++++++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.14.5.bb       |  3 +++
 2 files changed, 26 insertions(+)
 create mode 100644 meta/recipes-sato/webkit/files/cross-compile.patch
meta/recipes-sato/webkit/files/cross-compile.patch new file +23 -0
new file mode 100644
index 0000000000..4d1de72851
@@ -0,0 +1,23 @@
+Disable the tests meant to run when compiling natively
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+Index: webkitgtk-2.14.5/Source/cmake/OptionsCommon.cmake
+===================================================================
+--- webkitgtk-2.14.5.orig/Source/cmake/OptionsCommon.cmake
++++ webkitgtk-2.14.5/Source/cmake/OptionsCommon.cmake
+@@ -67,8 +67,11 @@ endif ()
+ # Detect Cortex-A53 core if CPU is ARM64 and OS is Linux.
+ # Query /proc/cpuinfo for each available core and check reported CPU part number: 0xd03 signals Cortex-A53.
+ # (see Main ID Register in ARM Cortex-A53 MPCore Processor Technical Reference Manual)
+-set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE OFF)
+-if (WTF_CPU_ARM64 AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
++if( NOT WTF_CPU_ARM64_CORTEXA53_INITIALVALUE)
++    set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE OFF)
++endif(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE)
++
++if (WTF_CPU_ARM64 AND NOT CMAKE_CROSSCOMPILING AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
+     execute_process(COMMAND nproc OUTPUT_VARIABLE PROC_COUNT)
+     math(EXPR PROC_MAX ${PROC_COUNT}-1)
+     foreach (PROC_ID RANGE ${PROC_MAX})
meta/recipes-sato/webkit/webkitgtk_2.14.5.bb +3 -0
index 1eb5b0b6e1..daa17a94da 100644
@@ -20,6 +20,7 @@ SRC_URI = "http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            file://0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch \
            file://detect_atomics.patch \
            file://x32_support.patch \
+           file://cross-compile.patch \
            "
 
 SRC_URI[md5sum] = "7fe3cb2699e64f969b285823c5ae2516"
@@ -83,6 +84,8 @@ EXTRA_OECMAKE_append_aarch64 = " -DUSE_LD_GOLD=OFF "
 EXTRA_OECMAKE_append_mipsarch = " -DUSE_LD_GOLD=OFF "
 EXTRA_OECMAKE_append_toolchain-clang = " -DUSE_LD_GOLD=OFF "
 
+EXTRA_OECMAKE_append_aarch64 = " -DWTF_CPU_ARM64_CORTEXA53=ON"
+
 # JIT not supported on MIPS either
 EXTRA_OECMAKE_append_mipsarch = " -DENABLE_JIT=OFF "
 
Signature · 1 line
2.12.0