1
- # Compiling on Morello
1
+ # Compiling MicroPython on Morello
2
2
3
- I compiled MicroPython directly on the CheriBSD/Morello machine, using the
4
- ` llvm-morello ` toolchain and ` gmake ` . The makefiles are not compatible with
5
- BSD ` make ` .
3
+ MicroPython can be compiled using hybrid tools on a CheriBSD/Morello machine.
4
+ It's possible to compile both hybrid and purecap builds for MicroPython.
5
+
6
+ ## Dependencies
7
+
8
+ On CheriBSD 22.12, the following packages need to be installed:
9
+
10
+ ```
11
+ pkg64 install git gmake libffi llvm-morello pkgconf python3
12
+ ```
13
+
14
+ For building purecap MicroPython, the purecap libffi is also required:
15
+
16
+ ```
17
+ pkg64c install libffi
18
+ ```
19
+
20
+ Note the requirement to use ` gmake ` rather than the default BSD ` make ` .
21
+ Also note that MicroPython build requires a working Python interpreter.
6
22
7
23
## Hybrid ABI
8
24
9
- To compile MicroPython for the Hybrid ABI, execute the following command in this folder:
25
+ To compile MicroPython for the Hybrid ABI, execute the following commands in this folder:
10
26
11
27
```
28
+ gmake CC='clang-morello' CXX='clang++-morello' submodules
12
29
gmake CC='clang-morello' CXX='clang++-morello'
13
30
```
14
31
15
32
## Purecap ABI
16
33
17
- To compile MicroPython for the Purecap ABI, execute the following command in this folder:
34
+ To compile MicroPython for the purecap ABI, execute the following commands in this folder:
18
35
19
36
```
20
- gmake CC='clang-morello -march=morello+c64 -mabi=purecap' CXX='clang++-morello -march=morello+c64 -mabi=purecap' LIBFFI_LDFLAGS='-L/usr/local/lib -lffi'
37
+ gmake CC='clang-morello -march=morello -mabi=purecap' CXX='clang++-morello -march=morello -mabi=purecap' LIBFFI_LDFLAGS='-L/usr/local/lib -lffi' submodules
38
+ gmake CC='clang-morello -march=morello -mabi=purecap' CXX='clang++-morello -march=morello -mabi=purecap' LIBFFI_LDFLAGS='-L/usr/local/lib -lffi'
21
39
```
22
40
23
41
The ` LIBFFI_LDFLAGS ` argument can be omitted if FFI has been turned off in ` mpconfigport.mk `
@@ -27,4 +45,3 @@ The `LIBFFI_LDFLAGS` argument can be omitted if FFI has been turned off in `mpco
27
45
To compile the coverage variant, simply append ` VARIANT=coverage ` to the ` gmake ` command.
28
46
If you get an internal error in Clang, remove the two lines in
29
47
` variants/coverage/mpconfigvariant.h ` which add the flags` -fprofile-arcs -ftest-coverage ` .
30
-
0 commit comments