Change `select LIBUKMMAP` to `imply LIBUKMMAP`. Do the same for `select
LIBPOSIX_MMAP`. This is because each may not be required for Go builds
(and use the other one instead).
With `select` in place you cannot disable the selection, resulting in a
dependency erorr when enabling the other one.
With `imply` as a soft select, any one can be disabled, removing the
dependency error.
Signed-off-by: Razvan Deaconescu <razvand@unikraft.io> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Marc Rittinghaus <marc.rittinghaus@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #8
This commit upgrades the library version to 1.18 by using the upstream
GO runtime library provided by GCC12.
New Makefile rules are introduced to compartimentalize GO pacakge
bulding. Helper scripts are also added to assist with creation of such
Makefiles.
Glue code was also added to help with compatibility, and additional
headers from `libffi` and `libbacktrace` were also introduced.
Co-authored-by: Marc Rittinghaus <marc.rittinghaus@unikraft.io> Co-authored-by: Eduard Vintilă <eduard.vintila47@gmail.com> Signed-off-by: Marc Rittinghaus <marc.rittinghaus@unikraft.io> Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #7
Simon Kuenzer [Tue, 13 Jul 2021 19:29:28 +0000 (21:29 +0200)]
Correct license headers introduced by NEC Laboratories Europe GmbH
This commit removes the additional clause
"THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY"
from BSD license headers that got introduced by mistake
with the following commits: 28fec31 - Add Makefile.uk (Charalampos Mainas) 19a8056 - Add glue code and stubs (Charalampos Mainas)
On the one hand, this additional clause is redundant because
the BSD license already states that it must remain and the
copyright notice must be kept.
On the other hand, the clause freezes the file header
and prohibits future contributors from extending the
copyright notice for their contributions. This additional
clause is not part of the official BSD 3-clause.
The original author(s) or an authorized representative from
the author's affiliation consents to the change with a
`Reviewed-by` tag to this commit.
Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu> Approved-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #1
Recent unikraft version provides the symbol for the `madvise` syscall.
This commit removes the stub from the glue code, otherwise it will cause
a duplicate error during building.
Razvan Virtan [Mon, 4 Oct 2021 17:21:19 +0000 (20:21 +0300)]
Remove real time signals references
At this moment uksignal doesn't support real time
signals (signal codes greater than 31). However, the Go runtime
assumes that it does and it tries to init signals up to SIGRTMAX,
causing any go application to fail. This commit avoids this situation.
These changes should be removed when real time signals support will
be added to uksignal.
Simon Kuenzer [Sat, 8 Feb 2020 10:47:14 +0000 (11:47 +0100)]
Fix error handling with uk_posix_memalign()
In the cases of failed allocation, `uk_posix_memalign()` is returning
an errno number but does not change `memptr`. Instead of checking
`memptr` being NULL, we test failures with `uk_posix_memalign()`'s
return codes.
Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
Simon Kuenzer [Fri, 7 Feb 2020 14:36:33 +0000 (15:36 +0100)]
Use uk_posix_memalign() for stack allocation
Recent changes in Unikraft modified uk_palloc()'s signature and
guarantees: allocation sizes are given with the number of pages and
the returned memory is not necessarily aligned to the size.
By using uk_posix_memalign() we restore our assumptions in the code.
Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
Update libcalls.go to decrease the number of stubs needed. This patch
removes wrappers for system calls that are not used from libgo and
that are not yet implemented on Unikraft.
Signed-off-by: Charalampos Mainas <Charalampos.Mainas@neclab.eu> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
libgo uses backtracking but it leads to page faults. For the time being
it is disabled but it should be revisited in the future.
The second patch decreases the amount of memory maps because it was
exceeding 1G.
Finally, Go uses context switching to manage goroutines. This patch
adds some changes to the way contexts are handled so they can be
compatible with threading in Unikraft.
Signed-off-by: Charalampos Mainas <Charalampos.Mainas@neclab.eu> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
libgo expects the unwind.h header although it comes with its own
header, unwind-generic.h, so we will be using that one instead. The
second patch removes an unnecessary include directive.
Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
The file packages.uk file was generated by capturing the building
commands from the output of the original libgo build. This patch also
adds the generated .go files needed for building the packages.
Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>