Update musl to 1.1.15 (#4813)

* Revert all emscripten musl changes

* Update musl to 1.1.5

* Reapply emscripten patches

* Fix up libs to partially compile

* Revert emscripten musl include folder

* Update musl include folder to 1.1.5

* Reapply emscripten libc include changes

* Get compiling again!

* Restore alltypes.h to have emscripten-specific changes

alltypes.h is autogenerated, and we've since overridden the types

Longer-term, we should figure out a way to either autogenerate the types
to match what emscripten expects, or change emscripten's expectation to
support musl's assumptions. Probably worth including with merging the
asm&wasm ABIs.

* Update expected langinfo test output for fixes in upstream musl

* Canonicalize nans in hyperbolic test

Nans are now printed out with their sign if negative. Asm and wasm treat
these differently, so canonicalize how they print.

* Tweak how musl forwards syscalls to emscripten

Before: pass all syscall args as varargs, args are int32
After: cast all syscall args to int32, pass as varargs
This fixes and prevents aliasing issues, and is more consistent with
other architectures

* Change __syscall to syscall in isatty to set errno

POSIX specifies that isatty sets errno in the case that it fails.
__syscall doesn't set errno, and syscall does.

* Update struct_info again

* Always allocate pthread_self, even in the stub

* sys_open should call __syscall_ret

* Fix up pthread js for optimized code (remove __asm: true)

* Canonicalize more nans in testsuite

* Re-set expected langinfo output

* Update align_moar expected addresses

* Disable assert in wasm_backend llseek syscall

* Update now-passing wasm_backend tests

* Update other.test_locale to non-stub setlocale

* Fix compiling with -s USE_PTHREADS=1

* Initialize __pthread_self() when using pthread_stub

* Canonicalize nans for test_zerodiv

* Update count of globals in test_dlfcn_self

* Rework how we initialize pthread_self for non-threaded applications

* Prefer 'EMSCRIPTEN_START_FUNCS' in test_memorygrowth, because 'var TOTAL_MEMORY' can move around

* Now that CURRENT_LOCALE isn't reading off NULL, test_langinfo should expect ASCII

* Re-disable test_demangle_stacks - was spuriously passing earlier

* Explicitly pass 0 as the high bits for SYS__llseek

* Enable v8 for test_readdir now that it supports printErr

* Only use __syscall_emscripten if __EMSCRIPTEN__ is defined

* Move O_LARGEFILE as default back to libc

* libc #if to #ifdef

* Rename pthread import funcs to not rely on alias

* Consistently reference pthread_setcancelstate by alias in libc

* Stub out fcntl64 for NO_FILESYSTEM case

* Update emscripten-specific pthread struct fields

* Consistently reference pthread_testcancel by alias in libc

* Stub out SYS_rt_sigqueueinfo syscall

* Stub out SYS_sendmmsg syscall

* Stub out SYS_recvmmsg syscall

* Revert "Consistently reference pthread_testcancel by alias in libc"

This reverts commit 43563a5b141a47d4a7aa7e48c059ed0e98597fbb.

* Revert "Consistently reference pthread_setcancelstate by alias in libc"

This reverts commit 2ca2eded8a0d50bb3847cda0a99c900532f6937b.

* Correctly fix unresolved symbol: __pthread_setcancelstate

* Update library_pthread.c pthread_testcancel to match musl's expectations

* test_strftime.c -> test_strftime.cpp

* library_pthread_stub pthread_exit should call exit, not nothing

* TEMP: init pthread_self->locale with pthreads enabled

* Initialize pthread global data from libc in JS

* Move _b_lock and _b_waiters back to not emscripten-only

* Remove untrue __asm annotation from threaded pthread_self, make stub pthread_self non-asm

* Remove old unneeded pthread init exported functions

* Move pthread_self in stub case to libc C code

* Move emscripten_pthread initialization to its own file, out from locale_map.c

* Statically allocate the pthread struct and not just a pointer in the stub case

* Remove commented-out test args

* Remove misleading __asm annotation for _register_pthread_ptr

* Do module-side pthread initialization in-module

* Don't cast away volatile when calling emscripten_futex_wake in __wake

* Expose libc struct to emscripten, use that for non-main pthread initialization

* Re-add pthread_impl.h import to library_pthread.c

* Update align_moar alignment post-rebase

* Update emscripten header include in libc.c

* Remove obsolete locale preallocating code in newlocale

We previously statically allocated a single locale in the event that
we needed to dynamically allocate one during startup. musl changed their
implementation to statically allocate C_LOCALE and UTF8_LOCALE, so we
already get that behavior.
In addition this was causing invalid locales to get allocated instead of
returning NULL, because the preceding logic changed. That was caught by
other.test_locale_wrong

* Update test_llvm_lto

* Bump version to 1.37.5
537 files changed
tree: 1a45fd0e37e3e175287dc470f6dbbf6256923c96
  1. cmake/
  2. docs/
  3. media/
  4. site/
  5. src/
  6. system/
  7. tests/
  8. third_party/
  9. tools/
  10. .gitignore
  11. AUTHORS
  12. ChangeLog.markdown
  13. CONTRIBUTING.md
  14. em++
  15. em++.bat
  16. em++.py
  17. em-config
  18. em-config.bat
  19. emar
  20. emar.bat
  21. emar.py
  22. embuilder.py
  23. emcc
  24. emcc.bat
  25. emcc.py
  26. emcmake
  27. emcmake.bat
  28. emcmake.py
  29. emconfigure
  30. emconfigure.bat
  31. emconfigure.py
  32. emlink.py
  33. emmake
  34. emmake.bat
  35. emmake.py
  36. emranlib
  37. emranlib.bat
  38. emrun
  39. emrun.bat
  40. emscons
  41. emscripten-version.txt
  42. emscripten.py
  43. LICENSE
  44. package.json
  45. README.md
README.md

emscripten logo

Emscripten is an LLVM-to-JavaScript compiler. It takes LLVM bitcode - which can be generated from C/C++, using llvm-gcc (DragonEgg) or clang, or any other language that can be converted into LLVM - and compiles that into JavaScript, which can be run on the web (or anywhere else JavaScript can run).

Links to demos, tutorial, FAQ, etc: https://github.com/kripken/emscripten/wiki

Main project page: http://emscripten.org

License

Emscripten is available under 2 licenses, the MIT license and the University of Illinois/NCSA Open Source License.

Both are permissive open source licenses, with little if any practical difference between them.

The reason for offering both is that (1) the MIT license is well-known, while (2) the University of Illinois/NCSA Open Source License allows Emscripten's code to be integrated upstream into LLVM, which uses that license, should the opportunity arise.

See LICENSE for the full content of the licenses.