[cef][wam] Make the recipe work with official chromium release tarballs
[AGL/meta-agl-demo.git] / recipes-wam / cef / files / chromium / 0033-M118-fix-Fix-skia-linker-issues-for-arm-neon.patch
1 From 0c37732e8443882518b79ce50b9389d1218484ef Mon Sep 17 00:00:00 2001
2 From: Roger Zanoni <rzanoni@igalia.com>
3 Date: Mon, 13 Nov 2023 22:10:25 -0300
4 Subject: [PATCH 33/33] [M118-fix] Fix skia linker issues for arm neon
5
6 Fixes the following linker issue:
7
8 error: undefined symbol: skia::ConvolveHorizontally_Neon(...)
9
10 Upstream-Status: Inappropriate
11 Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
12 ---
13  build/config/arm.gni  | 5 +++++
14  skia/ext/convolver.cc | 2 +-
15  2 files changed, 6 insertions(+), 1 deletion(-)
16
17 diff --git a/build/config/arm.gni b/build/config/arm.gni
18 index 575871c287c80..ebf56196c2605 100644
19 --- a/build/config/arm.gni
20 +++ b/build/config/arm.gni
21 @@ -122,10 +122,14 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") {
22        }
23      }
24    }
25 +  if (arm_use_neon) {
26 +    defines += [ "USE_NEON" ]
27 +  }
28  } else if (arm_use_neon == "" && (current_cpu == "arm64" || v8_current_cpu == "arm64")) {
29    # arm64 supports only "hard".
30    arm_float_abi = "hard"
31    arm_use_neon = true
32 +  defines += [ "USE_NEON" ]
33    declare_args() {
34      # Enables the new Armv8 branch protection features. Valid strings are:
35      # - "pac": Enables Pointer Authentication Code (PAC, featured in Armv8.3)
36 @@ -146,3 +150,4 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") {
37               arm_control_flow_integrity == "pac",
38           "Invalid branch protection option")
39  }
40 +
41 diff --git a/skia/ext/convolver.cc b/skia/ext/convolver.cc
42 index 8b3bd070d168a..a7d99de48d398 100644
43 --- a/skia/ext/convolver.cc
44 +++ b/skia/ext/convolver.cc
45 @@ -371,7 +371,7 @@ void SetupSIMD(ConvolveProcs *procs) {
46    procs->extra_horizontal_reads = 3;
47    procs->convolve_vertically = &ConvolveVertically_mips_dspr2;
48    procs->convolve_horizontally = &ConvolveHorizontally_mips_dspr2;
49 -#elif defined SIMD_NEON
50 +#elif defined USE_NEON && defined SIMD_NEON
51    procs->extra_horizontal_reads = 3;
52    procs->convolve_vertically = &ConvolveVertically_Neon;
53    procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_Neon;
54 -- 
55 2.42.1
56