WIP: package/qt5webengine: fix compile flags for rpi zero
RFC 1/1 WIP: package/qt5webengine: fix compile flags for rpi zero
The qt5webengine configure simple takes QT_ARCH ('arm') to determine the chromium compiler flags resulting in wrong defaults for the rpi zero case (resulting in illegal instruction failure), e.g.:
-march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -mfpu=vfpv3-d16
Add patch to overwrite the chromium settings with suitable values for the rpi zero case in the file rc/3rdparty/chromium/build/config/arm.gni.
Fixes:
$ /usr/lib/qt/examples/webengine/minimal/minimal Illegal instruction
---
Notes:
- Work-In-Progress patch to test the prinziple of chromium configuration for the rpi zero case, do not apply. A real fix should set the values in arm.gni determined from the buildroot configuration.
--- .../0002-force-rpi-zero-compile-flags.patch | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 package/qt5/qt5webengine/5.12.7/0002-force-rpi-zero-compile-flags.patch
package/qt5/qt5webengine/5.12.7/0002-force-rpi-zero-compile-flags.patch new file +60 -0
@@ -0,0 +1,60 @@ +From b1fb963cfc5c164663e78d948eb8482d0ab80edb Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Thu, 20 Feb 2020 20:16:53 +0100 +Subject: [PATCH] force rpi zero compile flags + +Signed-off-by: Peter Seiderer <[email protected]> +--- + src/3rdparty/chromium/build/config/arm.gni | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/3rdparty/chromium/build/config/arm.gni b/src/3rdparty/chromium/build/config/arm.gni +index abd4dd02f..8c0f4c979 100644 +--- a/src/3rdparty/chromium/build/config/arm.gni ++++ b/src/3rdparty/chromium/build/config/arm.gni +@@ -13,35 +13,35 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { + declare_args() { + # Version of the ARM processor when compiling on ARM. Ignored on non-ARM + # platforms. +- arm_version = 7 ++ arm_version = 6 + + # The ARM architecture. This will be a string like "armv6" or "armv7-a". + # An empty string means to use the default for the arm_version. +- arm_arch = "" ++ arm_arch = "armv6kz+fp" + + # The ARM floating point hardware. This will be a string like "neon" or + # "vfpv3". An empty string means to use the default for the arm_version. +- arm_fpu = "" ++ arm_fpu = "vfp" + + # The ARM floating point mode. This is either the string "hard", "soft", or + # "softfp". An empty string means to use the default one for the + # arm_version. +- arm_float_abi = "" ++ arm_float_abi = "hard" + + # The ARM variant-specific tuning mode. This will be a string like "armv6" + # or "cortex-a15". An empty string means to use the default for the + # arm_version. +- arm_tune = "" ++ arm_tune = "arm1176jzf-s" + + # Whether to use the neon FPU instruction set or not. +- arm_use_neon = "" ++ arm_use_neon = "false" + + # Whether to enable optional NEON code paths. + arm_optionally_use_neon = false + + # Thumb is a reduced instruction set available on some ARM processors that + # has increased code density. +- arm_use_thumb = true ++ arm_use_thumb = false + } + + assert(arm_float_abi == "" || arm_float_abi == "hard" || +-- +2.25.0 +
Signature · 1 line
2.25.0
Hello Peter,
Quoted 13 lines · On Thu, 20 Feb 2020 23:49:38 +0100 Peter Seiderer <[email protected]> wrote:
The qt5webengine configure simple takes
QT_ARCH('arm') to determine the chromium compiler flags resulting in wrong defaults for the rpi zero case (resulting in illegal instruction failure), e.g.:-march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -mfpu=vfpv3-d16Add patch to overwrite the chromium settings with suitable values for the rpi zero case in the file rc/3rdparty/chromium/build/config/arm.gni.
Fixes:
$ /usr/lib/qt/examples/webengine/minimal/minimal Illegal instruction
Quoted 6 lines
Signed-off-by Peter Seiderer <[email protected]>---
Notes:
- Work-In-Progress patch to test the prinziple of chromium configuration for the rpi zero case, do not apply. A real fix should set the values in arm.gni determined from the buildroot configuration.
I was indeed going to ask: why do we care about the RPi Zero specifically?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com