aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index b408e55..1bc870b 100644
--- a/README.md
+++ b/README.md
@@ -48,6 +48,22 @@ linker for certain math.h functions.
Run `redo all` to build the library and tests.
+### Cross Compilation
+
+To cross compile, run `./configure` as normal and edit the resulting `config.rc`
+to set `TCC` to the target compiler. Additional flags can be passed via the
+arrays `TCFLAGS`, `TCPPFLAGS`, `TLDFLAGS`, and `TLDLIBS`. Host specific flags
+can be passed via the corresponding `H<name>` arrays.
+
+For example, to cross compile for windows using `i686-w64-mingw32-gcc` as the
+target compiler and `clang` as the host compiler:
+
+```
+$ CC=clang ./configure
+$ echo TCC=i686-w64-mingw32-gcc >>config.rc
+$ redo all
+```
+
Testing
-------