1# config.site override for cross compiling to wasm32-emscripten platform 2# 3# CONFIG_SITE=Tools/wasm/config.site-wasm32-emscripten \ 4# emconfigure ./configure --host=wasm32-unknown-emscripten --build=... 5# 6# Written by Christian Heimes <[email protected]> 7# Partly based on pyodide's pyconfig.undefs.h file. 8# 9 10# cannot be detected in cross builds 11ac_cv_buggy_getaddrinfo=no 12 13# Emscripten has no /dev/pt* 14ac_cv_file__dev_ptmx=no 15ac_cv_file__dev_ptc=no 16 17# dummy readelf, Emscripten build does not need readelf. 18ac_cv_prog_ac_ct_READELF=true 19 20# new undefined symbols / unsupported features 21ac_cv_func_posix_spawn=no 22ac_cv_func_posix_spawnp=no 23ac_cv_func_eventfd=no 24ac_cv_func_memfd_create=no 25ac_cv_func_prlimit=no 26 27# unsupported syscall, https://github.com/emscripten-core/emscripten/issues/13393 28ac_cv_func_shutdown=no 29 30# The rest is based on pyodide 31# https://github.com/pyodide/pyodide/blob/main/cpython/pyconfig.undefs.h 32 33ac_cv_func_epoll_create=no 34ac_cv_func_epoll_create1=no 35ac_cv_header_linux_vm_sockets_h=no 36ac_cv_func_socketpair=no 37ac_cv_func_sigaction=no 38 39# symlinkat is implemented, but fails 40ac_cv_func_symlinkat=no 41 42# lchmod/lchown are implemented, but fail with ENOTSUP. 43ac_cv_func_lchmod=no 44ac_cv_func_lchown=no 45 46# geteuid / getegid are stubs and always return 0 (root). The stub breaks 47# code that assume effective user root has special permissions. 48ac_cv_func_geteuid=no 49ac_cv_func_getegid=no 50ac_cv_func_seteuid=no 51ac_cv_func_setegid=no 52ac_cv_func_getresuid=no 53ac_cv_func_getresgid=no 54ac_cv_func_setresuid=no 55ac_cv_func_setresgid=no 56 57# Syscalls not implemented in emscripten 58# [Errno 52] Function not implemented 59ac_cv_func_preadv2=no 60ac_cv_func_preadv=no 61ac_cv_func_pwritev2=no 62ac_cv_func_pwritev=no 63ac_cv_func_pipe2=no 64ac_cv_func_nice=no 65ac_cv_func_setpriority=no 66ac_cv_func_setitimer=no 67# unsupported syscall: __syscall_prlimit64 68ac_cv_func_prlimit=no 69# unsupported syscall: __syscall_getrusage 70ac_cv_func_getrusage=no 71ac_cv_func_posix_fallocate=no 72 73# Syscalls that resulted in a segfault 74ac_cv_func_utimensat=no 75ac_cv_header_sys_ioctl_h=no 76 77# sockets are supported, but only AF_INET / AF_INET6 in non-blocking mode. 78# Disable AF_UNIX and AF_PACKET support, see socketmodule.h. 79ac_cv_header_sys_un_h=no 80ac_cv_header_netpacket_packet_h=no 81 82# aborts with bad ioctl 83ac_cv_func_openpty=no 84ac_cv_func_forkpty=no 85 86# mkfifo and mknod are broken, create regular file 87ac_cv_func_mkfifo=no 88ac_cv_func_mkfifoat=no 89ac_cv_func_mknod=no 90ac_cv_func_mknodat=no 91 92# always fails with permission or not implemented error 93ac_cv_func_getgroups=no 94ac_cv_func_setgroups=no 95ac_cv_func_setresuid=no 96ac_cv_func_setresgid=no 97 98# Emscripten does not support hard links, always fails with errno 34 99# "Too many links". See emscripten_syscall_stubs.c 100ac_cv_func_link=no 101ac_cv_func_linkat=no 102 103# Emscripten's faccessat does not accept AT_* flags. 104ac_cv_func_faccessat=no 105 106# alarm signal is not delivered, may need a callback into the event loop? 107ac_cv_func_alarm=no 108