pyodide/cpython/patches/0005-add-emscripten-host.patch

83 lines
1.8 KiB
Diff

--- b/config.sub
+++ b/config.sub
@@ -118,7 +118,8 @@
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | cloudabi*-eabi* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
+ storm-chaos* | os2-emx* | rtmk-nova* | \
+ emscripten)
os=-$maybe_os
basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -377,6 +378,7 @@
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | wasm32 \
| avr-* | avr32-* \
| ba-* \
| be32-* | be64-* \
@@ -527,6 +529,9 @@
asmjs)
basic_machine=asmjs-unknown
;;
+ wasm32)
+ basic_machine=wasm32-unknown
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -1522,6 +1527,8 @@
;;
esac
;;
+ -emscripten)
+ ;;
-nacl*)
;;
-ios)
--- a/configure
+++ b/configure
@@ -3274,6 +3274,9 @@ then
*-*-vxworks*)
ac_sys_system=VxWorks
;;
+ wasm32-*-*)
+ ac_sys_system=Emscripten
+ ;;
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
@@ -3324,6 +3327,9 @@ if test "$cross_compiling" = yes; then
*-*-vxworks*)
_host_cpu=$host_cpu
;;
+ wasm32-*-*)
+ _host_cpu=
+ ;;
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
--- a/configure.ac
+++ b/configure.ac
@@ -382,6 +382,9 @@ then
*-*-vxworks*)
ac_sys_system=VxWorks
;;
+ wasm32-*-*)
+ ac_sys_system=Emscripten
+ ;;
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
@@ -430,6 +433,8 @@ if test "$cross_compiling" = yes; then
;;
*-*-vxworks*)
_host_cpu=$host_cpu
+ wasm32-*-*)
+ _host_cpu=
;;
*)
# for now, limit cross builds to known configurations