]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-145177: Update Emscripten to 6.0.2 (#153235)
authorHood Chatham <roberthoodchatham@gmail.com>
Mon, 6 Jul 2026 23:54:16 +0000 (16:54 -0700)
committerGitHub <noreply@github.com>
Mon, 6 Jul 2026 23:54:16 +0000 (23:54 +0000)
Removes the patched `getentropy()` call since it has been included upstream.

Platforms/emscripten/config.toml
Python/emscripten_syscalls.c
configure
configure.ac

index 389d2ea66ce948e13d06f4fa7a77dd912560a082..0c65a6623c9798a4be6263a1b6cfe6db6fdbef55 100644 (file)
@@ -1,7 +1,7 @@
 # Any data that can vary between Python versions is to be kept in this file.
 # This allows for blanket copying of the Emscripten build code between supported
 # Python versions.
-emscripten-version = "6.0.0"
+emscripten-version = "6.0.2"
 node-version = "24"
 test-args = [
     "-m", "test",
index b0c370ced36cc3335b1703373fce816c49b26948..48ca208dedb14bb94f675bf3eecc5408c9c161bb 100644 (file)
@@ -293,26 +293,6 @@ int __syscall_poll(intptr_t fds, int nfds, int timeout) {
     return __block_for_int(p);
 }
 
-
-// Workaround for an Emscripten bug: getentropy(buffer, 1) returns the single
-// byte of entropy as the return code. Fixed upstream by
-// emscripten-core/emscripten#27122
-int __real_getentropy(void*, size_t);
-
-int __wrap_getentropy(void *buffer, size_t len) {
-    if (len != 1) {
-        return __real_getentropy(buffer, len);
-    }
-    // Length is 1. Workaround is to get two bytes of entropy and write the
-    // first one into the original target buffer.
-    uint8_t tmp[2];
-    int ret = __real_getentropy(tmp, 2);
-    if (ret == 0) {
-        *(uint8_t *)buffer = tmp[0];
-    }
-    return ret;
-}
-
 #include <sys/ioctl.h>
 
 int syscall_ioctl_orig(int fd, int request, void* varargs)
index 01faef615a3d5e1c622a3c4dd68374686a3bf23c..76c58f7c3a463dbc22ce0a4daf64ea360567c73d 100755 (executable)
--- a/configure
+++ b/configure
@@ -9803,8 +9803,6 @@ fi
     as_fn_append LINKFORSHARED " -sSTACK_SIZE=5MB"
         as_fn_append LINKFORSHARED " -sTEXTDECODER=2"
 
-            as_fn_append LDFLAGS_NODIST " -Wl,--wrap=getentropy"
-
     if test "x$enable_wasm_dynamic_linking" = xyes
 then :
 
index a9fe5c269618fcd85a192b3384bfaecae5d834d7..de7a3abb379e659d29ac613c2f18af4b61246e0d 100644 (file)
@@ -2411,10 +2411,6 @@ AS_CASE([$ac_sys_system],
     dnl Avoid bugs in JS fallback string decoding path
     AS_VAR_APPEND([LINKFORSHARED], [" -sTEXTDECODER=2"])
 
-    dnl Workaround for a bug in Emscipten libc's getentropy. See
-    dnl __wrap_getentropy in Python/emscripten_syscalls.c.
-    AS_VAR_APPEND([LDFLAGS_NODIST], [" -Wl,--wrap=getentropy"])
-
     AS_VAR_IF([enable_wasm_dynamic_linking], [yes], [
       AS_VAR_APPEND([LINKFORSHARED], [" -sMAIN_MODULE"])
     ])