|
| 1 | +Cross-compiliation of Dash Core |
| 2 | +=============================== |
| 3 | + |
| 4 | +Dash Core can be cross-compiled on Linux to all other supported host systems. This is done by changing |
| 5 | +the `HOST` parameter when building the dependencies and then specifying another `--prefix` directory when building Dash. |
| 6 | + |
| 7 | +The following instructions are only tested on Debian Stretch and Ubuntu Bionic. |
| 8 | + |
| 9 | +MacOSX Cross-compilation |
| 10 | +------------------------ |
| 11 | +Cross-compiling to MacOSX requires a few additional packages to be installed: |
| 12 | + |
| 13 | +```bash |
| 14 | +$ sudo apt-get install python3-setuptools libcap-dev zlib1g-dev libbz2-dev |
| 15 | +``` |
| 16 | + |
| 17 | +Additionally, the Mac OSX SDK must be downloaded and extracted manually: |
| 18 | + |
| 19 | +```bash |
| 20 | +$ mkdir -p depends/sdk-sources |
| 21 | +$ mkdir -p depends/SDKs |
| 22 | +$ curl https://bitcoincore.org/depends-sources/sdks/MacOSX10.11.sdk.tar.gz -o depends/sdk-sources/MacOSX10.11.sdk.tar.gz |
| 23 | +$ tar -C depends/SDKs -xf depends/sdk-sources/MacOSX10.11.sdk.tar.gz |
| 24 | +``` |
| 25 | + |
| 26 | +When building the dependencies, as described in [build-generic](build-generic.md), use |
| 27 | + |
| 28 | +```bash |
| 29 | +$ make HOST=x86_64-apple-darwin11 -j4 |
| 30 | +``` |
| 31 | + |
| 32 | +When building Dash Core, use |
| 33 | + |
| 34 | +```bash |
| 35 | +$ ./configure --prefix `pwd`/depends/x86_64-apple-darwin11 |
| 36 | +``` |
| 37 | + |
| 38 | +Windows 64bit/32bit Cross-compilation |
| 39 | +------------------------------- |
| 40 | +Cross-compiling to Windows requires a few additional packages to be installed: |
| 41 | + |
| 42 | +```bash |
| 43 | +$ sudo apt-get install nsis wine wine64 bc |
| 44 | +``` |
| 45 | + |
| 46 | +For Windows 64bit, install : |
| 47 | +```bash |
| 48 | +$ sudo apt-get install g++-mingw-w64-x86-64 |
| 49 | +$ # Required to enable C++ threading libraries (e.g. std::thread) |
| 50 | +$ sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix |
| 51 | +$ sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix |
| 52 | +``` |
| 53 | + |
| 54 | +For Windows 32bit, install: |
| 55 | +```bash |
| 56 | +$ sudo apt-get install g++-mingw-w64-i686 |
| 57 | +$ # Required to enable C++ threading libraries (e.g. std::thread) |
| 58 | +$ sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix |
| 59 | +$ sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix |
| 60 | +``` |
| 61 | + |
| 62 | +When building the dependencies, as described in [build-generic](build-generic.md), use |
| 63 | + |
| 64 | +```bash |
| 65 | +$ make HOST=x86_64-w64-mingw32 -j4 |
| 66 | +``` |
| 67 | + |
| 68 | +When building Dash Core, use |
| 69 | + |
| 70 | +```bash |
| 71 | +$ ./configure --prefix `pwd`/depends/x86_64-w64-mingw32 |
| 72 | +``` |
| 73 | + |
| 74 | +These commands will build for Windows 64bit. If you want to compile for 32bit, |
| 75 | +replace `x86_64-w64-mingw32` with `i686-w64-mingw32`. |
| 76 | + |
| 77 | +ARM-Linux Cross-compilation |
| 78 | +------------------- |
| 79 | +Cross-compiling to ARM-Linux requires a few additional packages to be installed: |
| 80 | + |
| 81 | +```bash |
| 82 | +$ sudo apt-get install g++-arm-linux-gnueabihf |
| 83 | +``` |
| 84 | + |
| 85 | +When building the dependencies, as described in [build-generic](build-generic.md), use |
| 86 | + |
| 87 | +```bash |
| 88 | +$ make HOST=arm-linux-gnueabihf -j4 |
| 89 | +``` |
| 90 | + |
| 91 | +When building Dash Core, use |
| 92 | + |
| 93 | +```bash |
| 94 | +$ ./configure --prefix `pwd`/depends/arm-linux-gnueabihf |
| 95 | +``` |
0 commit comments