unikraft / lib-musl

musl: A C standard library
Other
9 stars 29 forks source link

patches: Add syscall function prototype #67

Closed eduardvintila closed 1 year ago

eduardvintila commented 1 year ago

The sys/syscall.h header is missing a declaration for the syscall() function, which may lead to implicit declaration warnings that could be treated as errors (i.e. by the GO runtime)

We also include Unikraft's syscall_nrs2.h header which provides definitions for the __NR_ macros needed by some libraries.

This PR is part of a series of PRs that work in conjunction for the update of Go support to 1.18:

For testing, make sure to pass to QEMU the -cpu host argument (this is necessary because the paging API and ukvmem are required by libgo as part of Virtual Address space management, and somehow the default CPU just won't handle 1GB pages).

Only GCC12 and x86 is supported for the moment.