summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-07-08 23:33:45 +0200
committerAraq <rumpf_a@web.de>2012-07-08 23:33:45 +0200
commitf0dd96fa58478f732009def25f527d67d87e464c (patch)
tree4445c7663570fc351853451f6f68b0de3c4bf6cc /doc
parentbb82e305081f65af828a0b88a455ee352bac8157 (diff)
downloadNim-f0dd96fa58478f732009def25f527d67d87e464c.tar.gz
cross-compilation improvements
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/nimrodc.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt
index b131acca1..0b740025a 100755
--- a/doc/nimrodc.txt
+++ b/doc/nimrodc.txt
@@ -103,7 +103,20 @@ To `cross compile`:idx:, use for example::
   nimrod c --cpu:i386 --os:linux --compile_only --gen_script myproject.nim

 

 Then move the C code and the compile script ``compile_myproject.sh`` to your 

-Linux i386 machine and run the script.

+Linux i386 machine and run the script.
+
+Another way is to make Nimrod invoke a cross compiler toolchain::
+  
+  nimrod c --cpu:arm --os:linux myproject.nim

+  
+For cross compilation, the compiler invokes a C compiler named 
+like ``$cpu.$os.$cc`` (for example arm.linux.gcc) and the configuration 
+system is used to provide meaningful defaults. For example for ``ARM`` your
+configuration file should contain something like::
+
+  arm.linux.gcc.path = "/usr/bin"
+  arm.linux.gcc.exe = "arm-linux-gcc"
+  arm.linux.gcc.linkerexe = "arm-linux-gcc"
 

 

 DLL generation