Skip to content

Commit 2019516

Browse files
committed
updated Morello build instructions, based on my experience
building on CheriBSD 22.12
1 parent 3a25f65 commit 2019516

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

ports/unix/README-morello.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,41 @@
1-
# Compiling on Morello
1+
# Compiling MicroPython on Morello
22

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.
622

723
## Hybrid ABI
824

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:
1026

1127
```
28+
gmake CC='clang-morello' CXX='clang++-morello' submodules
1229
gmake CC='clang-morello' CXX='clang++-morello'
1330
```
1431

1532
## Purecap ABI
1633

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:
1835

1936
```
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'
2139
```
2240

2341
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
2745
To compile the coverage variant, simply append `VARIANT=coverage` to the `gmake` command.
2846
If you get an internal error in Clang, remove the two lines in
2947
`variants/coverage/mpconfigvariant.h` which add the flags`-fprofile-arcs -ftest-coverage`.
30-

0 commit comments

Comments
 (0)