Genode platform fixes (#17521)

* Genode: move dyncall failures to runtime

Do not use the "error" pragma to warn that dynamic library loading is
not implemented, print a message at runtime and exit.

* Genode: use stricter dataspace type in page allocator

* Genode: remove compiler configuration from nim.cfg

Self-hosting Nim is not supported on Genode and defining the
cross-compilation environment can be done externally.

* Genode: use new mutex API

* Genode: call nim_component_construct as a C procedure

* Genode: implement echo for NimStringV2
This commit is contained in:
Emery Hemingway 2021-04-09 16:29:10 +02:00 • committed by GitHub
commit 8aa5991bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 60 additions and 53 deletions

View file

@ -114,7 +114,7 @@ nimblepath="$home/.nimble/pkgs/"
clang.options.linker = "-Wl,--as-needed -lnetwork"
clang.cpp.options.linker = "-Wl,--as-needed -lnetwork"
tcc.options.linker = "-Wl,--as-needed -lnetwork"
@else:
@elif not genode:
# -fopenmp
gcc.options.linker = "-ldl"
gcc.cpp.options.linker = "-ldl"
@ -289,29 +289,6 @@ vcc.cpp.options.size = "/O1"
# Configuration for the Tiny C Compiler:
tcc.options.always = "-w"
# Configuration for the Genode toolchain
@if genode:
noCppExceptions # avoid std C++
tlsEmulation:on # no TLS segment register magic
@if i386 or amd64:
gcc.exe = "genode-x86-gcc"
gcc.cpp.exe = "genode-x86-g++"
gcc.cpp.linkerexe = "genode-x86-ld"
@elif arm:
gcc.exe = "genode-arm-gcc"
gcc.cpp.exe = "genode-arm-g++"
gcc.cpp.linkerexe = "genode-arm-ld"
@elif arm64:
gcc.exe = "genode-aarch64-gcc"
gcc.cpp.exe = "genode-aarch64-g++"
gcc.cpp.linkerexe = "genode-aarch64-ld"
@elif riscv64:
gcc.exe = "genode-riscv-gcc"
gcc.cpp.exe = "genode-riscv-g++"
gcc.cpp.linkerexe = "genode-riscv-ld"
@end
@end
@if arm or arm64:
--define:nimEmulateOverflowChecks
@end