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:
parent
86a1dcf928
commit
8aa5991bea
7 changed files with 60 additions and 53 deletions
|
|
@ -150,6 +150,32 @@ elif defined(nintendoswitch):
|
|||
proc symAddr(lib: LibHandle, name: cstring): pointer =
|
||||
raise newException(OSError, "symAddr not implemented on Nintendo Switch!")
|
||||
|
||||
elif defined(genode):
|
||||
#
|
||||
# =========================================================================
|
||||
# Not implemented for Genode without POSIX. Raise an error if called.
|
||||
# =========================================================================
|
||||
#
|
||||
|
||||
template raiseErr(prc: string) =
|
||||
raise newException(OSError, prc & " not implemented, compile with POSIX suport")
|
||||
|
||||
proc dlclose(lib: LibHandle) =
|
||||
raiseErr(OSError, "dlclose")
|
||||
proc dlopen(path: cstring, mode: int): LibHandle =
|
||||
raiseErr(OSError, "dlopen")
|
||||
proc dlsym(lib: LibHandle, name: cstring): pointer =
|
||||
raiseErr(OSError, "dlsym")
|
||||
proc loadLib(path: string, global_symbols = false): LibHandle =
|
||||
raiseErr(OSError, "loadLib")
|
||||
proc loadLib(): LibHandle =
|
||||
raiseErr(OSError, "loadLib")
|
||||
proc unloadLib(lib: LibHandle) =
|
||||
raiseErr(OSError, "unloadLib")
|
||||
proc symAddr(lib: LibHandle, name: cstring): pointer =
|
||||
raiseErr(OSError, "symAddr")
|
||||
|
||||
|
||||
elif defined(windows) or defined(dos):
|
||||
#
|
||||
# =======================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue