]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-127146: Strip dash from Emscripten compiler version (#128557)
authorHood Chatham <roberthoodchatham@gmail.com>
Mon, 6 Jan 2025 22:26:35 +0000 (23:26 +0100)
committerGitHub <noreply@github.com>
Mon, 6 Jan 2025 22:26:35 +0000 (06:26 +0800)
`emcc -dumpversion` will sometimes say e.g., `4.0.0-git` but in this case
uname does not include `-git` in the version string. Use cut to delete
everything after the dash.

configure
configure.ac

index 61ee51c4b36473c2c0dfb958e57766384cd165a4..9024d22d4df5cd80872c96da61687bb5831e1ccd 100755 (executable)
--- a/configure
+++ b/configure
@@ -4595,7 +4595,7 @@ printf "%s\n" "$IPHONEOS_DEPLOYMENT_TARGET" >&6; }
                _host_ident=$host_cpu
                ;;
        *-*-emscripten)
-               _host_ident=$(emcc -dumpversion)-$host_cpu
+               _host_ident=$(emcc -dumpversion | cut -f1 -d-)-$host_cpu
                ;;
        wasm32-*-* | wasm64-*-*)
                _host_ident=$host_cpu
index 172e8a1a842010d5d641eddc62aec396752f94e7..86775e03e73d5a06a8154912f22db360110e693a 100644 (file)
@@ -794,7 +794,7 @@ if test "$cross_compiling" = yes; then
                _host_ident=$host_cpu
                ;;
        *-*-emscripten)
-               _host_ident=$(emcc -dumpversion)-$host_cpu
+               _host_ident=$(emcc -dumpversion | cut -f1 -d-)-$host_cpu
                ;;
        wasm32-*-* | wasm64-*-*)
                _host_ident=$host_cpu