arch-2-riscv64.patch 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
  2. index 8c83c13..b996472 100644
  3. --- a/build/gulpfile.reh.js
  4. +++ b/build/gulpfile.reh.js
  5. @@ -51,2 +51,3 @@ const BUILD_TARGETS = [
  6. { platform: 'linux', arch: 'ppc64le' },
  7. + { platform: 'linux', arch: 'riscv64' },
  8. { platform: 'alpine', arch: 'arm64' },
  9. diff --git a/build/gulpfile.scan.js b/build/gulpfile.scan.js
  10. index 274d889..0eafadc 100644
  11. --- a/build/gulpfile.scan.js
  12. +++ b/build/gulpfile.scan.js
  13. @@ -27,2 +27,3 @@ const BUILD_TARGETS = [
  14. { platform: 'linux', arch: 'ppc64le' },
  15. + { platform: 'linux', arch: 'riscv64' },
  16. ];
  17. diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
  18. index 7395ba4..66bf180 100644
  19. --- a/build/gulpfile.vscode.js
  20. +++ b/build/gulpfile.vscode.js
  21. @@ -495,2 +495,3 @@ const BUILD_TARGETS = [
  22. { platform: 'linux', arch: 'ppc64le' },
  23. + { platform: 'linux', arch: 'riscv64' },
  24. ];
  25. diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
  26. index 264cec1..37575e1 100644
  27. --- a/build/gulpfile.vscode.linux.js
  28. +++ b/build/gulpfile.vscode.linux.js
  29. @@ -33,3 +33,3 @@ const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
  30. function getDebPackageArch(arch) {
  31. - return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64', ppc64le: 'ppc64el' }[arch];
  32. + return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64', ppc64le: 'ppc64el', riscv64: 'riscv64' }[arch];
  33. }
  34. @@ -145,3 +145,3 @@ function getRpmBuildPath(rpmArch) {
  35. function getRpmPackageArch(arch) {
  36. - return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64', ppc64le: 'ppc64le' }[arch];
  37. + return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64', ppc64le: 'ppc64le', riscv64: 'riscv64' }[arch];
  38. }
  39. @@ -308,2 +308,3 @@ const BUILD_TARGETS = [
  40. { arch: 'ppc64le' },
  41. + { arch: 'riscv64' },
  42. ];
  43. diff --git a/build/linux/debian/calculate-deps.js b/build/linux/debian/calculate-deps.js
  44. index b97d275..37a5835 100644
  45. --- a/build/linux/debian/calculate-deps.js
  46. +++ b/build/linux/debian/calculate-deps.js
  47. @@ -54,2 +54,5 @@ function calculatePackageDeps(binaryPath, arch, chromiumSysroot, vscodeSysroot)
  48. break;
  49. + case 'riscv64':
  50. + cmd.push(`-l${chromiumSysroot}/usr/lib/riscv64-linux-gnu`, `-l${chromiumSysroot}/lib/riscv64-linux-gnu`, `-l${vscodeSysroot}/usr/lib/riscv64-linux-gnu`, `-l${vscodeSysroot}/lib/riscv64-linux-gnu`);
  51. + break;
  52. }
  53. diff --git a/build/linux/debian/calculate-deps.ts b/build/linux/debian/calculate-deps.ts
  54. index 5a6e9b4..903375f 100644
  55. --- a/build/linux/debian/calculate-deps.ts
  56. +++ b/build/linux/debian/calculate-deps.ts
  57. @@ -67,2 +67,8 @@ function calculatePackageDeps(binaryPath: string, arch: DebianArchString, chromi
  58. break;
  59. + case 'riscv64':
  60. + cmd.push(`-l${chromiumSysroot}/usr/lib/riscv64-linux-gnu`,
  61. + `-l${chromiumSysroot}/lib/riscv64-linux-gnu`,
  62. + `-l${vscodeSysroot}/usr/lib/riscv64-linux-gnu`,
  63. + `-l${vscodeSysroot}/lib/riscv64-linux-gnu`);
  64. + break;
  65. }
  66. diff --git a/build/linux/debian/dep-lists.js b/build/linux/debian/dep-lists.js
  67. index 64377e3..5fb20f8 100644
  68. --- a/build/linux/debian/dep-lists.js
  69. +++ b/build/linux/debian/dep-lists.js
  70. @@ -178,2 +178,42 @@ exports.referenceGeneratedDepsByArch = {
  71. ],
  72. + 'riscv64': [
  73. + 'ca-certificates',
  74. + 'libatomic1',
  75. + 'libasound2 (>= 1.0.17)',
  76. + 'libatk-bridge2.0-0 (>= 2.5.3)',
  77. + 'libatk1.0-0 (>= 2.2.0)',
  78. + 'libatspi2.0-0 (>= 2.9.90)',
  79. + 'libc6 (>= 2.17)',
  80. + 'libc6 (>= 2.28)',
  81. + 'libcairo2 (>= 1.6.0)',
  82. + 'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
  83. + 'libdbus-1-3 (>= 1.0.2)',
  84. + 'libdrm2 (>= 2.4.60)',
  85. + 'libexpat1 (>= 2.0.1)',
  86. + 'libgbm1 (>= 17.1.0~rc2)',
  87. + 'libglib2.0-0 (>= 2.16.0)',
  88. + 'libglib2.0-0 (>= 2.39.4)',
  89. + 'libgtk-3-0 (>= 3.9.10)',
  90. + 'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
  91. + 'libnspr4 (>= 2:4.9-2~)',
  92. + 'libnss3 (>= 2:3.22)',
  93. + 'libnss3 (>= 3.26)',
  94. + 'libpango-1.0-0 (>= 1.14.0)',
  95. + 'libsecret-1-0 (>= 0.18)',
  96. + 'libstdc++6 (>= 4.1.1)',
  97. + 'libstdc++6 (>= 5)',
  98. + 'libstdc++6 (>= 5.2)',
  99. + 'libstdc++6 (>= 6)',
  100. + 'libx11-6',
  101. + 'libx11-6 (>= 2:1.4.99.1)',
  102. + 'libxcb1 (>= 1.9.2)',
  103. + 'libxcomposite1 (>= 1:0.4.4-1)',
  104. + 'libxdamage1 (>= 1:1.1)',
  105. + 'libxext6',
  106. + 'libxfixes3',
  107. + 'libxkbcommon0 (>= 0.4.1)',
  108. + 'libxkbfile1',
  109. + 'libxrandr2',
  110. + 'xdg-utils (>= 1.0.2)'
  111. + ],
  112. };
  113. diff --git a/build/linux/debian/dep-lists.ts b/build/linux/debian/dep-lists.ts
  114. index aa769ad..5534874 100644
  115. --- a/build/linux/debian/dep-lists.ts
  116. +++ b/build/linux/debian/dep-lists.ts
  117. @@ -178,2 +178,42 @@ export const referenceGeneratedDepsByArch = {
  118. ],
  119. + 'riscv64': [
  120. + 'ca-certificates',
  121. + 'libatomic1',
  122. + 'libasound2 (>= 1.0.17)',
  123. + 'libatk-bridge2.0-0 (>= 2.5.3)',
  124. + 'libatk1.0-0 (>= 2.2.0)',
  125. + 'libatspi2.0-0 (>= 2.9.90)',
  126. + 'libc6 (>= 2.17)',
  127. + 'libc6 (>= 2.28)',
  128. + 'libcairo2 (>= 1.6.0)',
  129. + 'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
  130. + 'libdbus-1-3 (>= 1.0.2)',
  131. + 'libdrm2 (>= 2.4.60)',
  132. + 'libexpat1 (>= 2.0.1)',
  133. + 'libgbm1 (>= 17.1.0~rc2)',
  134. + 'libglib2.0-0 (>= 2.16.0)',
  135. + 'libglib2.0-0 (>= 2.39.4)',
  136. + 'libgtk-3-0 (>= 3.9.10)',
  137. + 'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
  138. + 'libnspr4 (>= 2:4.9-2~)',
  139. + 'libnss3 (>= 2:3.22)',
  140. + 'libnss3 (>= 3.26)',
  141. + 'libpango-1.0-0 (>= 1.14.0)',
  142. + 'libsecret-1-0 (>= 0.18)',
  143. + 'libstdc++6 (>= 4.1.1)',
  144. + 'libstdc++6 (>= 5)',
  145. + 'libstdc++6 (>= 5.2)',
  146. + 'libstdc++6 (>= 6)',
  147. + 'libx11-6',
  148. + 'libx11-6 (>= 2:1.4.99.1)',
  149. + 'libxcb1 (>= 1.9.2)',
  150. + 'libxcomposite1 (>= 1:0.4.4-1)',
  151. + 'libxdamage1 (>= 1:1.1)',
  152. + 'libxext6',
  153. + 'libxfixes3',
  154. + 'libxkbcommon0 (>= 0.4.1)',
  155. + 'libxkbfile1',
  156. + 'libxrandr2',
  157. + 'xdg-utils (>= 1.0.2)'
  158. + ],
  159. };
  160. diff --git a/build/linux/debian/install-sysroot.js b/build/linux/debian/install-sysroot.js
  161. index 3dcd5c1..b4e3542 100644
  162. --- a/build/linux/debian/install-sysroot.js
  163. +++ b/build/linux/debian/install-sysroot.js
  164. @@ -141,2 +141,6 @@ async function getVSCodeSysroot(arch) {
  165. break;
  166. + case 'riscv64':
  167. + expectedName = `riscv64-linux-gnu${prefix}.tar.gz`;
  168. + triple = 'riscv64-linux-gnu';
  169. + break;
  170. }
  171. diff --git a/build/linux/debian/install-sysroot.ts b/build/linux/debian/install-sysroot.ts
  172. index 52b3422..11d54b1 100644
  173. --- a/build/linux/debian/install-sysroot.ts
  174. +++ b/build/linux/debian/install-sysroot.ts
  175. @@ -158,2 +158,6 @@ export async function getVSCodeSysroot(arch: DebianArchString): Promise<string>
  176. break;
  177. + case 'riscv64':
  178. + expectedName = `riscv64-linux-gnu${prefix}.tar.gz`;
  179. + triple = 'riscv64-linux-gnu';
  180. + break;
  181. }
  182. diff --git a/build/linux/debian/types.js b/build/linux/debian/types.js
  183. index 2c56b9c..cadefc2 100644
  184. --- a/build/linux/debian/types.js
  185. +++ b/build/linux/debian/types.js
  186. @@ -8,3 +8,3 @@ exports.isDebianArchString = isDebianArchString;
  187. function isDebianArchString(s) {
  188. - return ['amd64', 'armhf', 'arm64', 'ppc64el'].includes(s);
  189. + return ['amd64', 'armhf', 'arm64', 'ppc64el', 'riscv64'].includes(s);
  190. }
  191. diff --git a/build/linux/debian/types.ts b/build/linux/debian/types.ts
  192. index 43f2434..24fe452 100644
  193. --- a/build/linux/debian/types.ts
  194. +++ b/build/linux/debian/types.ts
  195. @@ -5,6 +5,6 @@
  196. -export type DebianArchString = 'amd64' | 'armhf' | 'arm64' | 'ppc64el';
  197. +export type DebianArchString = 'amd64' | 'armhf' | 'arm64' | 'ppc64el' | 'riscv64';
  198. export function isDebianArchString(s: string): s is DebianArchString {
  199. - return ['amd64', 'armhf', 'arm64', 'ppc64el'].includes(s);
  200. + return ['amd64', 'armhf', 'arm64', 'ppc64el', 'riscv64'].includes(s);
  201. }
  202. diff --git a/build/linux/rpm/types.js b/build/linux/rpm/types.js
  203. index 7b58961..99a8cff 100644
  204. --- a/build/linux/rpm/types.js
  205. +++ b/build/linux/rpm/types.js
  206. @@ -8,3 +8,3 @@ exports.isRpmArchString = isRpmArchString;
  207. function isRpmArchString(s) {
  208. - return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le'].includes(s);
  209. + return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le', 'riscv64'].includes(s);
  210. }
  211. diff --git a/build/linux/rpm/types.ts b/build/linux/rpm/types.ts
  212. index 3f3c3f5..d94537e 100644
  213. --- a/build/linux/rpm/types.ts
  214. +++ b/build/linux/rpm/types.ts
  215. @@ -5,6 +5,6 @@
  216. -export type RpmArchString = 'x86_64' | 'armv7hl' | 'aarch64' | 'ppc64le';
  217. +export type RpmArchString = 'x86_64' | 'armv7hl' | 'aarch64' | 'ppc64le' | 'riscv64';
  218. export function isRpmArchString(s: string): s is RpmArchString {
  219. - return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le'].includes(s);
  220. + return ['x86_64', 'armv7hl', 'aarch64', 'ppc64le', 'riscv64'].includes(s);
  221. }
  222. diff --git a/cli/src/update_service.rs b/cli/src/update_service.rs
  223. index bcab676..29228cb 100644
  224. --- a/cli/src/update_service.rs
  225. +++ b/cli/src/update_service.rs
  226. @@ -219,2 +219,3 @@ pub enum Platform {
  227. LinuxPPC64LELegacy,
  228. + LinuxRISCV64,
  229. DarwinX64,
  230. @@ -233,2 +234,3 @@ impl Platform {
  231. Platform::LinuxPPC64LE => Some("linux-ppc64le".to_owned()),
  232. + Platform::LinuxRISCV64 => Some("linux-riscv64".to_owned()),
  233. Platform::DarwinX64 => Some("darwin".to_owned()),
  234. @@ -253,2 +255,3 @@ impl Platform {
  235. Platform::LinuxPPC64LELegacy => "server-linux-legacy-ppc64le",
  236. + Platform::LinuxRISCV64 => "server-linux-riscv64",
  237. Platform::DarwinX64 => "server-darwin",
  238. @@ -274,2 +277,3 @@ impl Platform {
  239. Platform::LinuxPPC64LELegacy => "cli-linux-ppc64le",
  240. + Platform::LinuxRISCV64 => "cli-linux-riscv64",
  241. Platform::DarwinX64 => "cli-darwin-x64",
  242. @@ -308,2 +312,4 @@ impl Platform {
  243. Some(Platform::LinuxPPC64LE)
  244. + } else if cfg!(all(target_os = "linux", target_arch = "riscv64")) {
  245. + Some(Platform::LinuxRISCV64)
  246. } else if cfg!(all(target_os = "macos", target_arch = "x86_64")) {
  247. @@ -337,2 +343,3 @@ impl fmt::Display for Platform {
  248. Platform::LinuxPPC64LELegacy => "LinuxPPC64LELegacy",
  249. + Platform::LinuxRISCV64 => "LinuxRISCV64",
  250. Platform::DarwinX64 => "DarwinX64",
  251. diff --git a/cli/src/util/prereqs.rs b/cli/src/util/prereqs.rs
  252. index 4827a47..137a257 100644
  253. --- a/cli/src/util/prereqs.rs
  254. +++ b/cli/src/util/prereqs.rs
  255. @@ -88,2 +88,4 @@ impl PreReqChecker {
  256. Platform::LinuxPPC64LE
  257. + } else if cfg!(target_arch = "riscv64") {
  258. + Platform::LinuxRISCV64
  259. } else {
  260. diff --git a/resources/server/bin/helpers/check-requirements-linux.sh b/resources/server/bin/helpers/check-requirements-linux.sh
  261. index 00dd3e2..91c9d20 100644
  262. --- a/resources/server/bin/helpers/check-requirements-linux.sh
  263. +++ b/resources/server/bin/helpers/check-requirements-linux.sh
  264. @@ -57,2 +57,3 @@ case $ARCH in
  265. ppc64el) LDCONFIG_ARCH="64bit";;
  266. + riscv64) LDCONFIG_ARCH="RISC-V";;
  267. esac
  268. diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts
  269. index 004df84..fb2acc7 100644
  270. --- a/src/vs/platform/extensionManagement/common/extensionManagement.ts
  271. +++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts
  272. @@ -42,2 +42,3 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) {
  273. case TargetPlatform.LINUX_PPC64LE: return 'Linux PowerPC64';
  274. + case TargetPlatform.LINUX_RISCV64: return 'Linux RISC-V 64';
  275. @@ -66,2 +67,3 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform {
  276. case TargetPlatform.LINUX_PPC64LE: return TargetPlatform.LINUX_PPC64LE;
  277. + case TargetPlatform.LINUX_RISCV64: return TargetPlatform.LINUX_RISCV64;
  278. @@ -104,2 +106,5 @@ export function getTargetPlatform(platform: Platform | 'alpine', arch: string |
  279. }
  280. + if (arch === 'riscv64') {
  281. + return TargetPlatform.LINUX_RISCV64;
  282. + }
  283. return TargetPlatform.UNKNOWN;
  284. diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts
  285. index a7d6298..a7aa2bb 100644
  286. --- a/src/vs/platform/extensions/common/extensions.ts
  287. +++ b/src/vs/platform/extensions/common/extensions.ts
  288. @@ -295,2 +295,3 @@ export const enum TargetPlatform {
  289. LINUX_PPC64LE = 'linux-ppc64le',
  290. + LINUX_RISCV64 = 'linux-riscv64',