diff options
author | Jack Lloyd <[email protected]> | 2017-11-30 21:09:55 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-11-30 21:09:55 -0500 |
commit | f9b7b4df49b28ead21b1919597811f3968c1f843 (patch) | |
tree | f1f9abe0c9c6668039a48ef33b46087f3361fa4a /doc/manual | |
parent | 69a519395949a1f816df022e4a09532f3c790166 (diff) |
Describe cross builds [ci skip]
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/building.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/manual/building.rst b/doc/manual/building.rst index b3dbc97bb..db24bbe72 100644 --- a/doc/manual/building.rst +++ b/doc/manual/building.rst @@ -106,6 +106,24 @@ variant commonly used by Microsoft compilers. To add a new variant (eg, a build script for VMS), you will need to create a new template file in ``src/build-data/makefile``. +Cross Compiling +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Cross compiling refers to building software on one type of host (say Linux +x86-64) but creating a binary for some other type (say MinGW x86-32). This is +completely supported by the build system. To extend the example, we must tell +`configure.py` to use the MinGW tools: + + $ ./configure.py --os=mingw --cpu=x86_32 --cc-bin=i686-w64-mingw32-g++ --ar=i686-w64-mingw32-ar + ... + $ make + ... + $ file botan.exe + botan.exe: PE32 executable (console) Intel 80386, for MS Windows + +You can also specify the alternate tools by setting the `CXX` and `AR` +environment variables, as is commonly done with autoconf builds. + On Unix ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |