Browse Source

fix: add patch to fix linux arm build (#22523)

Cheng Zhao 5 years ago
parent
commit
479354e721
3 changed files with 27 additions and 1 deletions
  1. 3 1
      patches/config.json
  2. 1 0
      patches/swiftshader/.patches
  3. 23 0
      patches/swiftshader/marl_arm.patch

+ 3 - 1
patches/config.json

@@ -5,5 +5,7 @@
 
   "src/electron/patches/v8":  "src/v8",
 
-  "src/electron/patches/node": "src/third_party/electron_node"
+  "src/electron/patches/node": "src/third_party/electron_node",
+
+  "src/electron/patches/swiftshader": "src/third_party/swiftshader"
 }

+ 1 - 0
patches/swiftshader/.patches

@@ -0,0 +1 @@
+marl_arm.patch

+ 23 - 0
patches/swiftshader/marl_arm.patch

@@ -0,0 +1,23 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Cheng Zhao <[email protected]>
+Date: Wed, 4 Mar 2020 14:23:28 -0700
+Subject: fix: linux arm build
+
+Fix Linux ARM build error caused by compiler update.
+
+This means to be a quick fix, we should choose other solution once we
+get an answer at:
+https://bugs.chromium.org/p/chromium/issues/detail?id=1058107
+
+diff --git a/third_party/marl/src/osfiber_asm_arm.S b/third_party/marl/src/osfiber_asm_arm.S
+index d276ac806..b2be5face 100644
+--- a/third_party/marl/src/osfiber_asm_arm.S
++++ b/third_party/marl/src/osfiber_asm_arm.S
+@@ -22,6 +22,7 @@
+ // x1: to
+ .text
+ .global marl_fiber_swap
++.type marl_fiber_swap, %function
+ .align 4
+ marl_fiber_swap:
+