diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 ------- |