Lines Matching +full:in +full:- +full:tree
1 # kvm-unit-tests on macOS
8 tests. They're available in [homebrew](https://brew.sh):
11 $ brew install gnu-getopt
14 A cross-compiler with ELF support is required to build kvm-unit-tests on macOS.
16 ### Pre-built cross-compiler
18 Binary packages of ELF cross-compilers for i386 and x86_64 target can be
21 $ brew install i686-elf-gcc
22 $ brew install x86_64-elf-gcc
25 Make enhanced getopt available in the current shell session:
27 export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"
30 Then, 32-bit x86 tests can be built like that:
33 --arch=i386 \
34 --cross-prefix=i686-elf-
35 $ make -j $(nproc)
38 64-bit x86 tests can be built likewise:
41 --arch=x86_64 \
42 --cross-prefix=x86_64-elf-
43 $ make -j $(nproc)
46 Out-of-tree build can be used to make tests for both architectures
47 simultaneously in separate build directories.
49 ### Building cross-compiler from source
51 An alternative is to build cross-compiler toolchain from source using
52 crosstool-ng. The latest released version of
53 [crosstool-ng](https://github.com/crosstool-ng/crosstool-ng) can be installed
56 $ brew install crosstool-ng
59 A case-sensitive APFS/HFS+ volume has to be created using Disk Utility as a
60 build and installation directory for the cross-compiler. Please [see Apple
61 documentation](https://support.apple.com/guide/disk-utility/dsku19ed921c/mac)
64 Assuming the case-sensitive volume is named /Volumes/BuildTools, the
65 cross-compiler can be built and installed there:
67 $ X_BUILD_DIR=/Volumes/BuildTools/ct-ng-build
68 $ X_INSTALL_DIR=/Volumes/BuildTools/x-tools
70 $ ct-ng -C $X_BUILD_DIR x86_64-unknown-linux-gnu
71 $ ct-ng -C $X_BUILD_DIR build CT_PREFIX=$X_INSTALL_DIR
74 Once compiled, the cross-compiler can be used to build the tests:
77 --arch=x86_64 \
78 --cross-prefix=$X_INSTALL_DIR/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-
79 $ make -j $(nproc)