2021-12-18 15:54:02 +01:00
|
|
|
# config.site override for cross compiling to wasm32-emscripten platform
|
|
|
|
#
|
|
|
|
# CONFIG_SITE=Tools/wasm/config.site-wasm32-emscripten \
|
|
|
|
# emconfigure ./configure --host=wasm32-unknown-emscripten --build=...
|
|
|
|
#
|
|
|
|
# Written by Christian Heimes <christian@python.org>
|
|
|
|
# Partly based on pyodide's pyconfig.undefs.h file.
|
|
|
|
#
|
|
|
|
|
|
|
|
# cannot be detected in cross builds
|
|
|
|
ac_cv_buggy_getaddrinfo=no
|
|
|
|
|
|
|
|
# Emscripten has no /dev/pt*
|
|
|
|
ac_cv_file__dev_ptmx=no
|
|
|
|
ac_cv_file__dev_ptc=no
|
|
|
|
|
|
|
|
# new undefined symbols / unsupported features
|
|
|
|
ac_cv_func_posix_spawn=no
|
|
|
|
ac_cv_func_posix_spawnp=no
|
|
|
|
ac_cv_func_eventfd=no
|
|
|
|
ac_cv_func_memfd_create=no
|
|
|
|
ac_cv_func_prlimit=no
|
|
|
|
|
|
|
|
# unsupported syscall, https://github.com/emscripten-core/emscripten/issues/13393
|
|
|
|
ac_cv_func_shutdown=no
|
|
|
|
|
|
|
|
# The rest is based on pyodide
|
|
|
|
# https://github.com/pyodide/pyodide/blob/main/cpython/pyconfig.undefs.h
|
|
|
|
|
2022-01-09 11:58:59 +01:00
|
|
|
ac_cv_func_epoll_create=no
|
2021-12-18 15:54:02 +01:00
|
|
|
ac_cv_func_epoll_create1=no
|
|
|
|
ac_cv_header_linux_vm_sockets_h=no
|
|
|
|
ac_cv_func_socketpair=no
|
|
|
|
ac_cv_func_sigaction=no
|
|
|
|
|
2022-04-02 10:13:44 +02:00
|
|
|
# symlinkat is implemented, but fails
|
2021-12-18 15:54:02 +01:00
|
|
|
ac_cv_func_symlinkat=no
|
2022-04-02 10:13:44 +02:00
|
|
|
|
2022-03-17 12:09:57 +01:00
|
|
|
# lchmod/lchown are implemented, but fail with ENOTSUP.
|
|
|
|
ac_cv_func_lchmod=no
|
|
|
|
ac_cv_func_lchown=no
|
2021-12-18 15:54:02 +01:00
|
|
|
|
2022-06-19 18:28:55 +02:00
|
|
|
# geteuid / getegid are stubs and always return 0 (root). The stub breaks
|
|
|
|
# code that assume effective user root has special permissions.
|
|
|
|
ac_cv_func_geteuid=no
|
|
|
|
ac_cv_func_getegid=no
|
|
|
|
ac_cv_func_seteuid=no
|
|
|
|
ac_cv_func_setegid=no
|
2022-09-11 10:10:00 +02:00
|
|
|
ac_cv_func_getresuid=no
|
|
|
|
ac_cv_func_getresgid=no
|
|
|
|
ac_cv_func_setresuid=no
|
|
|
|
ac_cv_func_setresgid=no
|
2022-06-19 18:28:55 +02:00
|
|
|
|
2021-12-18 15:54:02 +01:00
|
|
|
# Syscalls not implemented in emscripten
|
2022-01-20 18:56:33 +01:00
|
|
|
# [Errno 52] Function not implemented
|
2021-12-18 15:54:02 +01:00
|
|
|
ac_cv_func_preadv2=no
|
|
|
|
ac_cv_func_preadv=no
|
|
|
|
ac_cv_func_pwritev2=no
|
|
|
|
ac_cv_func_pwritev=no
|
|
|
|
ac_cv_func_pipe2=no
|
|
|
|
ac_cv_func_nice=no
|
2022-03-10 13:43:40 +01:00
|
|
|
ac_cv_func_setpriority=no
|
2022-01-20 18:56:33 +01:00
|
|
|
ac_cv_func_setitimer=no
|
2022-02-05 20:52:01 +01:00
|
|
|
# unsupported syscall: __syscall_prlimit64
|
|
|
|
ac_cv_func_prlimit=no
|
|
|
|
# unsupported syscall: __syscall_getrusage
|
|
|
|
ac_cv_func_getrusage=no
|
|
|
|
ac_cv_func_posix_fallocate=no
|
2021-12-18 15:54:02 +01:00
|
|
|
|
|
|
|
# Syscalls that resulted in a segfault
|
|
|
|
ac_cv_func_utimensat=no
|
|
|
|
ac_cv_header_sys_ioctl_h=no
|
|
|
|
|
2022-03-11 23:25:14 +01:00
|
|
|
# sockets are supported, but only AF_INET / AF_INET6 in non-blocking mode.
|
|
|
|
# Disable AF_UNIX and AF_PACKET support, see socketmodule.h.
|
|
|
|
ac_cv_header_sys_un_h=no
|
|
|
|
ac_cv_header_netpacket_packet_h=no
|
2021-12-18 15:54:02 +01:00
|
|
|
|
2022-01-14 18:48:44 +01:00
|
|
|
# aborts with bad ioctl
|
|
|
|
ac_cv_func_openpty=no
|
|
|
|
ac_cv_func_forkpty=no
|
|
|
|
|
2022-02-05 20:52:01 +01:00
|
|
|
# mkfifo and mknod are broken, create regular file
|
|
|
|
ac_cv_func_mkfifo=no
|
|
|
|
ac_cv_func_mkfifoat=no
|
|
|
|
ac_cv_func_mknod=no
|
|
|
|
ac_cv_func_mknodat=no
|
|
|
|
|
2022-03-08 12:17:30 +01:00
|
|
|
# always fails with permission or not implemented error
|
|
|
|
ac_cv_func_getgroups=no
|
2022-02-05 20:52:01 +01:00
|
|
|
ac_cv_func_setgroups=no
|
|
|
|
ac_cv_func_setresuid=no
|
|
|
|
ac_cv_func_setresgid=no
|
|
|
|
|
2022-03-08 12:17:30 +01:00
|
|
|
# Emscripten does not support hard links, always fails with errno 34
|
|
|
|
# "Too many links". See emscripten_syscall_stubs.c
|
|
|
|
ac_cv_func_link=no
|
|
|
|
ac_cv_func_linkat=no
|
|
|
|
|
2022-06-07 14:04:27 +02:00
|
|
|
# Emscripten's faccessat does not accept AT_* flags.
|
|
|
|
ac_cv_func_faccessat=no
|
|
|
|
|
2022-02-05 20:52:01 +01:00
|
|
|
# alarm signal is not delivered, may need a callback into the event loop?
|
|
|
|
ac_cv_func_alarm=no
|