summaryrefslogtreecommitdiffstats
path: root/recipes-wam/cef/files/chromium/0030-M118-fix-Only-default-arm_use_neon-to-true-if-its-va.patch
blob: 08a2db60210e62e01d114971dfdb0f91a5b47257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
From 55fe851951b11c30e010b5f3df618addf606e3d4 Mon Sep 17 00:00:00 2001
From: Roger Zanoni <rzanoni@igalia.com>
Date: Wed, 8 Nov 2023 14:35:21 -0300
Subject: [PATCH 30/33] [M118-fix] Only default arm_use_neon to true if its
 value wasn't already set

arm_use_neon was always being set causing the build to fail.

Upstream-Status: Needs checking
Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
---
 build/config/arm.gni | 58 +++++++++++++++++++++-----------------------
 1 file changed, 27 insertions(+), 31 deletions(-)

diff --git a/build/config/arm.gni b/build/config/arm.gni
index 5b404c1ca94f0..575871c287c80 100644
--- a/build/config/arm.gni
+++ b/build/config/arm.gni
@@ -9,36 +9,39 @@ import("//build/config/v8_target_cpu.gni")
 # ARM code is being compiled.  But they can also be relevant in the
 # other contexts when the code will change its behavior based on the
 # cpu it wants to generate code for.
-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
+declare_args() {
+  # Version of the ARM processor when compiling on ARM. Ignored on non-ARM
+  # platforms.
+  arm_version = 7
 
-    # 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 = ""
+  # 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 = ""
 
-    # 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 = ""
+  # 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 = ""
 
-    # 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 = ""
+  # 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 = ""
 
-    # Whether to use the neon FPU instruction set or not.
-    arm_use_neon = ""
+  # Whether to use the neon FPU instruction set or not.
+  arm_use_neon = ""
 
-    # Whether to enable optional NEON code paths.
-    arm_optionally_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
-  }
+  # Thumb is a reduced instruction set available on some ARM processors that
+  # has increased code density.
+  arm_use_thumb = true
 
+  arm_control_flow_integrity = "none"
+  arm_float_abi = ""
+}
+
+if (current_cpu == "arm" || v8_current_cpu == "arm") {
   # For lacros build, we use ARM v8 by default.
   if (is_chromeos_lacros && arm_arch == "") {
     # TODO(crbug.com/1467681) Enable i8mm and dotprod instructions for ffmpeg
@@ -49,13 +52,6 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") {
 
   if (current_os == "android" || target_os == "android") {
     arm_float_abi = "softfp"
-  } else {
-    declare_args() {
-      # 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 = ""
-    }
   }
   assert(arm_float_abi == "" || arm_float_abi == "hard" ||
          arm_float_abi == "soft" || arm_float_abi == "softfp")
@@ -126,7 +122,7 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") {
       }
     }
   }
-} else if (current_cpu == "arm64" || v8_current_cpu == "arm64") {
+} else if (arm_use_neon == "" && (current_cpu == "arm64" || v8_current_cpu == "arm64")) {
   # arm64 supports only "hard".
   arm_float_abi = "hard"
   arm_use_neon = true
-- 
2.42.1