-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update musl to v1.2.2 #13006
Update musl to v1.2.2 #13006
Conversation
7b7d0c6
to
dbcfac4
Compare
870e53a
to
8ad514f
Compare
364a812
to
148de5a
Compare
9f8eb3a
to
d24d4e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Please update the changelog and the readme.
What is the cause of the code size regressions?
b81af8a
to
e1bf2e6
Compare
Updated with thread state management that matched more closely the the way musl does it. We now use musl's |
ec6001f
to
39bcb01
Compare
Excellent! Thanks for all the work here @sbc100 & @kleisauke ! |
We had some reports of missing symbols in LTO builds after the musl upgrade (#13006): https://groups.google.com/g/emscripten-discuss/c/g_vkRRSCPUI/m/aT6fnUAtCQAJ?utm_medium=email&utm_source=footer This change moves some of the new math-related source files into the libc-mt library which is excluded from LTO (see comments in in system_libs.py for background on this). Verified that `lto2.test_float_builtinsTest` now passes with this change but fails without (after musl upgrade).
We have had reports of missing symbols in LTO builds after the musl upgrade (#13006): https://groups.google.com/g/emscripten-discuss/c/g_vkRRSCPUI/m/aT6fnUAtCQAJ?utm_medium=email&utm_source=footer Also `lto2.test_float_builtinsTest` started failing on the emscripten-releases FYI waterfall. This change moves some of the new math-related source files into the libc-mt library which is excluded from LTO (see comments in in system_libs.py for background on this). Fixes: #15506
We have had reports of missing symbols in LTO builds after the musl upgrade (#13006): https://groups.google.com/g/emscripten-discuss/c/g_vkRRSCPUI/m/aT6fnUAtCQAJ?utm_medium=email&utm_source=footer Also `lto2.test_float_builtinsTest` started failing on the emscripten-releases FYI waterfall. This change moves some of the new math-related source files into the libc-mt library which is excluded from LTO (see comments in in system_libs.py for background on this). Fixes: #15506
Regression introduced here: emscripten-core#13006 We are relying on them having 10 elems thru the `_a_prio` field and also offsets in library_pthread.js
Regression introduced here: emscripten-core#13006 We are relying on them having 10 elems thru the `_a_prio` field (in wasm64) and also offsets in library_pthread.js
Regression introduced here: #13006 We are relying on them having 10 elems thru the `_a_prio` field (in wasm64) and also offsets in library_pthread.js
The changes here mostly come from running the update_musl.py script against the following commit: https://github.com/emscripten-core/musl/tree/merge_v1.2.2 Notes: - `weak` is defined in musl-internal headers so some of our usage of `__attribute__((weak))` was switched to `__weak__` (which is a synonym). - Quite a few changes needed in library_pthread.js due to changes to the internal representation of __pthread struct in C. - removal of emscripten-specific threadStatus field. This can can be fully replaced with the updated `detach_state` that was added to musl (along with enum values for states!) along with the existing `cancel` bit. - `attr` is no longer stored on `__pthread`; it was only duplicating other fields anyway. We now include `pthread_getattr_np.c` which can pull those field out on demand into at attr structure.
This test started failing after this line was added as part of emscripten-core#13006. However it seems this change was unneeded. See: emscripten-core#15498
We have had reports of missing symbols in LTO builds after the musl upgrade (emscripten-core#13006): https://groups.google.com/g/emscripten-discuss/c/g_vkRRSCPUI/m/aT6fnUAtCQAJ?utm_medium=email&utm_source=footer Also `lto2.test_float_builtinsTest` started failing on the emscripten-releases FYI waterfall. This change moves some of the new math-related source files into the libc-mt library which is excluded from LTO (see comments in in system_libs.py for background on this). Fixes: emscripten-core#15506
Regression introduced here: emscripten-core#13006 We are relying on them having 10 elems thru the `_a_prio` field (in wasm64) and also offsets in library_pthread.js
This mirrors an upstream change in musl (emscripten-core/musl@7cc79d10) and should really have been done as part of emscripten-core#13006. With had report from a user who was injecting emscripten's `sysroot/include` path explicitly putting it before the clang's builtin include path which triggered `__LONG_MAX` to be undefined.
This mirrors an upstream change in musl (emscripten-core/musl@7cc79d10) and should really have been done as part of emscripten-core#13006. With had report from a user who was injecting emscripten's `sysroot/include` path explicitly putting it before the clang's builtin include path which triggered `__LONG_MAX` to be undefined.
This mirrors an upstream change in musl (emscripten-core/musl@7cc79d10) and should really have been done as part of #13006. With had report from a user who was injecting emscripten's `sysroot/include` path explicitly putting it before the clang's builtin include path which triggered `__LONG_MAX` to be undefined.
This mirrors an upstream change in musl (emscripten-core/musl@7cc79d10) and should really have been done as part of emscripten-core#13006. With had report from a user who was injecting emscripten's `sysroot/include` path explicitly putting it before the clang's builtin include path which triggered `__LONG_MAX` to be undefined.
The changes here mostly come from running the update_musl.py script
against the following commit:
https://github.com/emscripten-core/musl/tree/merge_v1.2.2
Notes:
weak
is defined in musl-internal headers so some of our usage of__attribute__((weak))
was switched to__weak__
(which is asynonym).
Quite a few changes needed in library_pthread.js due to changes to
the internal representation of __pthread struct in C.
can be fully replaced with the updated
detach_state
thatwas added to musl (along with enum values for states!) along
with the existing
cancel
bit.attr
is no longer stored on__pthread
; it was only duplicatingother fields anyway. We now include
pthread_getattr_np.c
whichcan pull those field out on demand into at attr structure.
Fixes: #8740