summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config/nim.cfg3
-rw-r--r--lib/pure/osproc.nim6
2 files changed, 8 insertions, 1 deletions
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)