Costin Lupu [Sat, 7 Dec 2019 08:29:37 +0000 (10:29 +0200)]
core: Add thread related definitions
With pthread-embedded library, special care has to be taken when dealing with
conversions from `pthread_t` to scalar values. Therefore we have to define our
own conversion functions.
We also copy `ruby_fill_thread_id_string()` function from origin to glue in
order to avoid patching the origin code. The function is copied here because of
a bug in the Ruby implementation, which only defines it if THREAD_DEBUG is
enabled. When this bug is fixed in Ruby, this is no long necessary.
Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro> Reviewed-by: Stefan Teodorescu <stefanl.teodorescu@gmail.com>
Andrei Gogonea [Sat, 7 Dec 2019 06:25:01 +0000 (08:25 +0200)]
core: Build core functionality
With these changes we only build the Ruby interpreter. In the following patches
we will add Ruby extensions and encodings as well. The original Ruby build
provides what is called 'miniruby' - the minimalistic variant of the Ruby
intepretor and which doesn't have any extensions. We used the same idea to
provide a minimalistic version for Unikraft when the mini configuration is
checked via menuconfig.
Some of the sources need to be generated by the origin build system, that's why
we are running both `./configure` and `make` on the origin code before building
for Unikraft.
Signed-off-by: Andrei Gogonea <andrei.gogonea09@gmail.com> Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro> Reviewed-by: Stefan Teodorescu <stefanl.teodorescu@gmail.com>