Genode fixes (#10491)
Readline pasthru, add linker to config, do not pass -lm to linker.
This commit is contained in:
parent
07a0a61875
commit
15422a3e5a
4 changed files with 15 additions and 3 deletions
|
|
@ -290,13 +290,16 @@ tcc.options.always = "-w"
|
||||||
|
|
||||||
# Configuration for the Genode toolchain
|
# Configuration for the Genode toolchain
|
||||||
@if genode:
|
@if genode:
|
||||||
|
noCppExceptions # avoid std C++
|
||||||
|
tlsEmulation:on # no TLS segment register magic
|
||||||
gcc.path = "/usr/local/genode-gcc/bin"
|
gcc.path = "/usr/local/genode-gcc/bin"
|
||||||
gcc.cpp.options.always = "-D__GENODE__ -fno-stack-protector"
|
|
||||||
@if i386 or amd64:
|
@if i386 or amd64:
|
||||||
gcc.exe = "genode-x86-gcc"
|
gcc.exe = "genode-x86-gcc"
|
||||||
gcc.cpp.exe = "genode-x86-g++"
|
gcc.cpp.exe = "genode-x86-g++"
|
||||||
|
gcc.cpp.linkerexe = "genode-x86-ld"
|
||||||
@elif arm:
|
@elif arm:
|
||||||
gcc.exe = "genode-arm-gcc"
|
gcc.exe = "genode-arm-gcc"
|
||||||
gcc.cpp.exe = "genode-arm-g++"
|
gcc.cpp.exe = "genode-arm-g++"
|
||||||
|
gcc.cpp.linkerexe = "genode-arm-ld"
|
||||||
@end
|
@end
|
||||||
@end
|
@end
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,15 @@ when defined(Windows):
|
||||||
discard readConsoleInputW(hStdin, irInputRecord, 1, dwEventsRead)
|
discard readConsoleInputW(hStdin, irInputRecord, 1, dwEventsRead)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
elif defined(genode):
|
||||||
|
proc readLineFromStdin*(prompt: string): TaintedString {.
|
||||||
|
tags: [ReadIOEffect, WriteIOEffect].} =
|
||||||
|
stdin.readLine()
|
||||||
|
|
||||||
|
proc readLineFromStdin*(prompt: string, line: var TaintedString): bool {.
|
||||||
|
tags: [ReadIOEffect, WriteIOEffect].} =
|
||||||
|
stdin.readLine(line)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
import linenoise, termios
|
import linenoise, termios
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
{.deadCodeElim: on.} # dce option deprecated
|
{.deadCodeElim: on.} # dce option deprecated
|
||||||
|
|
||||||
when defined(Posix):
|
when defined(Posix) and not defined(genode):
|
||||||
{.passl: "-lm".}
|
{.passl: "-lm".}
|
||||||
|
|
||||||
var
|
var
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ proc fac*(n: int): int =
|
||||||
|
|
||||||
{.push checks:off, line_dir:off, stack_trace:off.}
|
{.push checks:off, line_dir:off, stack_trace:off.}
|
||||||
|
|
||||||
when defined(Posix):
|
when defined(Posix) and not defined(genode):
|
||||||
{.passl: "-lm".}
|
{.passl: "-lm".}
|
||||||
|
|
||||||
const
|
const
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue