2019-07-16 14:05:40 +00:00
# Cross Compile
Currently supported targets:
Tier 1:
2020-10-08 00:09:47 +00:00
These builds are fully automated using [Drone CI ](https://drone.io ). Guaranteed to be fully reproducible.
2019-07-16 14:05:40 +00:00
* Linux (arm/x86)
2020-10-08 00:09:47 +00:00
* Windows 8+ (32 and 64 bit x86)
2019-07-16 14:05:40 +00:00
Tier 2:
2020-10-08 00:09:47 +00:00
These targets have no build automation available, but do not require patches to build or run.
2019-07-16 14:05:40 +00:00
* Mac OSX (> 10.10)
* Android (arm/x86)
* Apple IOS
* Linux PPC64 (little endian)
2020-10-08 00:09:47 +00:00
* FreeBSD (amd64)
2019-07-16 14:05:40 +00:00
Tier 3:
2020-10-08 00:09:47 +00:00
These targets are somewhat obscure or possibly obsolete, and may require some patching to fix target specific issues.
2019-07-16 14:05:40 +00:00
* Big Endian Linux
* NetBSD
* OpenBSD
2020-10-08 00:09:47 +00:00
* Windows pre-8 (while this is technically possible, the requirement for [cryptographically reproducible builds ](https://reproducible-builds.org/ ) precludes it.)
* UNIX v5 (x86 AMD64)
2019-07-16 14:05:40 +00:00
2020-10-08 00:09:47 +00:00
Unsupported
(feel free to support this yourself)
2019-07-16 14:05:40 +00:00
2020-10-08 00:09:47 +00:00
we are completely unable to test these targets at all, proceed at your own risk
2019-07-16 14:05:40 +00:00
* AIX
* zOS
## For Windows
To cross compile for windows on non windows platforms run:
$ make windows
## For Other Linux
2019-07-16 14:11:05 +00:00
## deps
this setup assumes ubuntu
first you need to cross compile and install libuv:
$ git clone https://github.com/libuv/libuv
$ mkdir -p build & & cd build
$ export TOOLCHAIN=arm-linux-gnueabihf # or whatever your compiler is
$ cmake -DCMAKE_C_COMPILER=$(TOOLCHAIN)-gcc-8 -DCMAKE_INSTALL_PREFIX=/usr/$(TOOLCHAIN)
$ make
$ sudo make install
## build
2019-07-16 14:05:40 +00:00
To cross compile on linux for another archietecture:
2019-07-16 14:11:05 +00:00
# for rpi 3
2019-07-16 14:05:40 +00:00
$ make CROSS=ON TOOLCHAIN=contrib/armhf.toolchain.cmake
# for ppc64le
$ make CROSS=ON TOOLCHAIN=contrib/ppc64le.toolchain.cmake