[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT/MUSL PATCH 00/19] Update to a first functional version
This series of patches allows to have a first functional version of musl (compiles + links). Note that only a subset of functions is working. Additional tests (https://wiki.musl-libc.org/libc-test.html) must be performed to test the coverage (future work). Furthermore, some functions can have unexpected behaviour since they use musl internal thread support (future work - see below). Porting musl is not trivial since musl is fully multithread-aware, and uses (internal) threading support everywhere. The considered approach was to remove musl internal pthread structures to use the ones of libpthread-embedded. Nevertheless, as musl and pthread-embedded use two different representations/structures of pthread, it was necessary to stub and/or exclude some functions that manipulate internal fields of pthread structure. First patches don't compile/link and are wip. Quick overview: - Patches[1,2]: Concern C++ support and update Makefile.uk to run configure script after the patching. - Patches[3,8]: Remove pthread definitions from musl, use header from pthread-embedded library and avoid multiple definitions. - Patch [9]: Adds glue code between musl and unikraft. - Patches [10,13]: Remove syscall wrapper and use syscall_shim. - Patches [14,17]: Add stubs and glue code. - Patches [18,19]: Avoid multiple definitions and update Config.uk (COMPILE AND LINKS). Gaulthier Gain (19): Add support for C++ applications Call configure after patching Add patch to avoid conflicts in threads definitions Add patch to use pthread header from pthread-embedded library Add patch to fix missing include in synccall.c Add patch to rename __unused field to pad Update Makefiles to exclude functions that use __pthread_self() Update Makefiles to avoid multiple definitions during linking Add glue code rules for mem.c in Makefile.uk Add patch to remove syscall prototype in unistd.h Remove syscall.c wrapper Use syscall_shim layer instead of musl internal syscalls Add patch to update setxid if syscall num is not known at build time Add stubs for functions related to dlerror.c Add stub for ftrylockfile function Add stub for __tls_get_new function Implement functions related to process management with glue code Update Makefiles to exclude functions to avoid multiple definitions Update Config.uk with the required micro-libs Config.uk | 3 + Makefile.uk | 42 +++- Makefile.uk.musl.dirent | 18 +- Makefile.uk.musl.env | 6 +- Makefile.uk.musl.fcntl | 8 +- Makefile.uk.musl.ldso | 4 +- Makefile.uk.musl.legacy | 2 +- Makefile.uk.musl.linux | 12 +- Makefile.uk.musl.locale | 2 +- Makefile.uk.musl.misc | 18 +- Makefile.uk.musl.process | 50 ++-- Makefile.uk.musl.stat | 22 +- Makefile.uk.musl.stdio | 8 +- Makefile.uk.musl.thread | 245 ++++++++++--------- Makefile.uk.musl.time | 10 +- Makefile.uk.musl.unistd | 88 +++---- include/syscall.h | 84 ++----- include/uk/process.h | 43 ++++ ldso.c | 70 ++++++ ...update-alltypes_in_h-for-pthread-embedded.patch | 62 +++++ .../0005-use-pthread_h-from-pthread-embedded.patch | 261 +++++++++++++++++++++ .../0006-add-missing-include-for-synccall.patch | 28 +++ patches/0007-remove-struct-__unused-to-pad.patch | 26 ++ patches/0008-remove-prototype-syscall.patch | 27 +++ patches/0009-use-uk-syscall.patch | 34 +++ process.c | 242 +++++++++++++++++++ stdio.c | 43 ++++ syscall.c | 144 ------------ thread.c | 41 ++++ 29 files changed, 1174 insertions(+), 469 deletions(-) create mode 100644 include/uk/process.h create mode 100644 ldso.c create mode 100644 patches/0004-update-alltypes_in_h-for-pthread-embedded.patch create mode 100644 patches/0005-use-pthread_h-from-pthread-embedded.patch create mode 100644 patches/0006-add-missing-include-for-synccall.patch create mode 100644 patches/0007-remove-struct-__unused-to-pad.patch create mode 100644 patches/0008-remove-prototype-syscall.patch create mode 100644 patches/0009-use-uk-syscall.patch create mode 100644 process.c create mode 100644 stdio.c delete mode 100644 syscall.c create mode 100644 thread.c -- 2.11.0 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |