From 5595eb13051df6aa214d8b3ad319bfcfda0101f4 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Tue, 24 May 2022 15:25:25 -0700 Subject: [PATCH] Fix uname to report emscripten version accurately (#2608) This is needed for the normal Python packaging system to accurately determine the platform tag for wheels for #2591. This has been fixed upstream: https://github.com/emscripten-core/emscripten/pull/17026 --- ...-Throw-away-errors-in-minify_wasm_js.patch | 2 +- emsdk/patches/0002-Fix-dup.patch | 2 +- ...3-Fix-side-module-exception-handling.patch | 2 +- ...pPath-when-applied-to-a-symlink-loop.patch | 2 +- ...Indicate-Emscripten-version-in-uname.patch | 27 +++++++++++++++++++ 5 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 emsdk/patches/0007-Indicate-Emscripten-version-in-uname.patch diff --git a/emsdk/patches/0001-Throw-away-errors-in-minify_wasm_js.patch b/emsdk/patches/0001-Throw-away-errors-in-minify_wasm_js.patch index 15d8c0e4a..eac2e9461 100644 --- a/emsdk/patches/0001-Throw-away-errors-in-minify_wasm_js.patch +++ b/emsdk/patches/0001-Throw-away-errors-in-minify_wasm_js.patch @@ -1,7 +1,7 @@ From e83a295f8e1b8c48d4748d1811a4b22840f25e14 Mon Sep 17 00:00:00 2001 From: Hood Date: Thu, 24 Jun 2021 04:08:02 -0700 -Subject: [PATCH 1/4] Throw away errors in minify_wasm_js +Subject: [PATCH 1/7] Throw away errors in minify_wasm_js --- emcc.py | 13 ++++++++----- diff --git a/emsdk/patches/0002-Fix-dup.patch b/emsdk/patches/0002-Fix-dup.patch index 402ad12a3..d5d46ddfd 100644 --- a/emsdk/patches/0002-Fix-dup.patch +++ b/emsdk/patches/0002-Fix-dup.patch @@ -1,7 +1,7 @@ From 40956dee436737d9dd40e0b57c6e2ebd26569920 Mon Sep 17 00:00:00 2001 From: Hood Date: Wed, 8 Sep 2021 17:49:15 -0700 -Subject: [PATCH 2/4] Fix dup +Subject: [PATCH 2/7] Fix dup This fixes two problems with the `dup` system calls: 1. `dup` expects that every file descriptor has a corresponding file (so pipes and (https://github.com/emscripten-core/emscripten/issues/14640) diff --git a/emsdk/patches/0003-Fix-side-module-exception-handling.patch b/emsdk/patches/0003-Fix-side-module-exception-handling.patch index c00cd5c38..1062ed857 100644 --- a/emsdk/patches/0003-Fix-side-module-exception-handling.patch +++ b/emsdk/patches/0003-Fix-side-module-exception-handling.patch @@ -1,7 +1,7 @@ From 73b89ee1b5a57c65824baf91b547be32b69decbd Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Tue, 15 Feb 2022 23:27:03 -0500 -Subject: [PATCH 3/4] Fix side module exception handling +Subject: [PATCH 3/7] Fix side module exception handling See https://github.com/emscripten-core/emscripten/pull/16309 diff --git a/emsdk/patches/0004-Fix-lookupPath-when-applied-to-a-symlink-loop.patch b/emsdk/patches/0004-Fix-lookupPath-when-applied-to-a-symlink-loop.patch index d66f2d54c..3970266ad 100644 --- a/emsdk/patches/0004-Fix-lookupPath-when-applied-to-a-symlink-loop.patch +++ b/emsdk/patches/0004-Fix-lookupPath-when-applied-to-a-symlink-loop.patch @@ -1,7 +1,7 @@ From 8de43377d0e72a4c5794f8494a06d81a9609090f Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 2 Mar 2022 13:44:14 -0800 -Subject: [PATCH 4/4] Fix lookupPath when applied to a symlink loop +Subject: [PATCH 4/7] Fix lookupPath when applied to a symlink loop The following code leads to an infinite loop in lookupPath: diff --git a/emsdk/patches/0007-Indicate-Emscripten-version-in-uname.patch b/emsdk/patches/0007-Indicate-Emscripten-version-in-uname.patch new file mode 100644 index 000000000..58e53455f --- /dev/null +++ b/emsdk/patches/0007-Indicate-Emscripten-version-in-uname.patch @@ -0,0 +1,27 @@ +From 6aca63c041033835d08a99fb54b3327a36652ff8 Mon Sep 17 00:00:00 2001 +From: Hood Chatham +Date: Wed, 18 May 2022 21:49:17 -0700 +Subject: [PATCH 7/7] Indicate Emscripten version in uname + +This patch has been upstreamed: +https://github.com/emscripten-core/emscripten/pull/17026 +--- + src/library_syscall.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/library_syscall.js b/src/library_syscall.js +index 09721d025..296ee7008 100644 +--- a/src/library_syscall.js ++++ b/src/library_syscall.js +@@ -762,7 +762,7 @@ var SyscallsLibrary = { + }; + copyString('sysname', 'Emscripten'); + copyString('nodename', 'emscripten'); +- copyString('release', '1.0'); ++ copyString('release', '2.0.27'); + copyString('version', '#1'); + #if MEMORY64 == 1 + copyString('machine', 'wasm64'); +-- +2.25.1 +