aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-08-05 18:30:33 +0100
committerTomasz Kramkowski <tk@the-tk.com>2021-08-05 20:17:48 +0100
commit8c58e5683cbd90d529eb1ea86fce019e553b2248 (patch)
treeb31e8754a56ab0a87170bfecffca3ef434850826 /README.md
parent7e7bdc19e76a5f87bccf7a84872f8d45295ee5b7 (diff)
downloadpack-8c58e5683cbd90d529eb1ea86fce019e553b2248.tar.gz
pack-8c58e5683cbd90d529eb1ea86fce019e553b2248.tar.xz
pack-8c58e5683cbd90d529eb1ea86fce019e553b2248.zip
Cross compilation support
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
-------