summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-11-16 20:43:39 +0100
committerAraq <rumpf_a@web.de>2014-11-16 20:43:39 +0100
commit69a994b59ee91d3221fe7a696cd40671b15e335b (patch)
treec80c2348e2a83a4b34cf38eda6b90d28e559b67c
parent4c7c612efeb9c0ad323068fb9b1624c849602e86 (diff)
parent11cb8ff890929a119cbb14048f06df3353bbfeb9 (diff)
downloadNim-69a994b59ee91d3221fe7a696cd40671b15e335b.tar.gz
Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
-rw-r--r--compiler/jsgen.nim3
-rw-r--r--config/nim.cfg3
-rw-r--r--lib/pure/osproc.nim6
3 files changed, 10 insertions, 2 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index 4772aecb5..37eaa9fb7 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -1669,7 +1669,8 @@ proc genHeader(): PRope =
                  "/*   (c) 2014 Andreas Rumpf */$n$n" & 
                  "$nvar Globals = this;$n" &
                  "var framePtr = null;$n" & 
-                 "var excHandler = null;$n", 
+                 "var excHandler = null;$n" &
+                 "var lastJSError = null;$n", 
                  [toRope(VersionAsString)])
 
 proc genModule(p: PProc, n: PNode) = 
diff --git a/config/nim.cfg b/config/nim.cfg
index 62fe3307e..ef416323a 100644
--- a/config/nim.cfg
+++ b/config/nim.cfg
@@ -13,6 +13,9 @@ cc = gcc
 arm.linux.gcc.exe = "arm-linux-gcc"
 arm.linux.gcc.linkerexe = "arm-linux-gcc"
 
+mips.linux.gcc.exe = "mips-openwrt-linux-gcc"
+mips.linux.gcc.linkerexe = "mips-openwrt-linux-gcc"
+
 @if not nimfix:
   cs:partial
 @end
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim
index 2983712c8..bfdb0efed 100644
--- a/lib/pure/osproc.nim
+++ b/lib/pure/osproc.nim
@@ -822,7 +822,11 @@ elif not defined(useNimRtl):
         environ = data.sysEnv
         discard execvp(data.sysCommand, data.sysArgs)
       else:
-        discard execvpe(data.sysCommand, data.sysArgs, data.sysEnv)
+        when defined(uClibc):
+          # uClibc environment (OpenWrt included) doesn't have the full execvpe 
+          discard execve(data.sysCommand, data.sysArgs, data.sysEnv)
+        else:
+          discard execvpe(data.sysCommand, data.sysArgs, data.sysEnv)
     else:
       discard execve(data.sysCommand, data.sysArgs, data.sysEnv)