diff options
author | Emery Hemingway <ehmry@posteo.net> | 2018-08-16 18:12:37 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-08-16 18:12:37 +0200 |
commit | 2da0341b4d6828479c5dc75a233b47732f53cf6c (patch) | |
tree | 525b358312f727da17dc631e0e2090041c46f8eb /compiler | |
parent | 87b2d2aad6a19ae0e2cafb7fcc8ac1502aed01fa (diff) | |
download | Nim-2da0341b4d6828479c5dc75a233b47732f53cf6c.tar.gz |
Genode fixes (#8501)
* Genode fixes - wrap strings in "Genode::Cstring" when logging - define SIGABRT for Genode - disable GCC -fstack-protector - use log RPC for fatal messages - add --os:genode build to appveyor - define paramStr and paramCount * Select fixups for Genode POSIX
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ccgexprs.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index dd1c72ab6..9ec034f67 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -982,7 +982,7 @@ proc genEcho(p: BProc, n: PNode) = # is threadsafe. internalAssert p.config, n.kind == nkBracket if p.config.target.targetOS == osGenode: - # bypass libc and print directly to the Genode LOG session + # echo directly to the Genode LOG session var args: Rope = nil var a: TLoc for it in n.sons: @@ -990,8 +990,9 @@ proc genEcho(p: BProc, n: PNode) = add(args, ", \"\"") else: initLocExpr(p, it, a) - add(args, ropecg(p.module, ", #nimToCStringConv($1)", [rdLoc(a)])) + add(args, ropecg(p.module, ", Genode::Cstring($1->data, $1->len)", [rdLoc(a)])) p.module.includeHeader("<base/log.h>") + p.module.includeHeader("<util/string.h>") linefmt(p, cpsStmts, """Genode::log(""$1);$n""", args) else: if n.len == 0: |