-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.patmos
62 lines (37 loc) · 1.77 KB
/
README.patmos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
COMPILER-RT FOR PATMOS
This is the compiler-rt library for Patmos, providing software routines for
soft-floats, conversions, division etc.
--------------------------------------------------------------------------------
1. Requirements
- cmake 2.8 or higher
- LLVM, Clang, and NewLib for Patmos (optional)
https://github.com/t-crest/patmos-llvm
https://github.com/t-crest/patmos-clang
https://github.com/t-crest/patmos-newlib
--------------------------------------------------------------------------------
2. Configure and build
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/patmos-clang-toolchain.cmake \
-DCMAKE_INSTALL_PREFIX=/path/to/newlib/prefix/ \
-DTRIPLE=patmos-unknown-unknown-elf
make
make install
The -DTRIPLE option is optional and defaults to patmos-unknown-unknown-elf.
'make install' puts the generated files next to the installed patmos-newlib
library files (which was configured with --prefix during newlib configuration)
You can disable the use of inline assembly code by setting
CFLAGS="-DCRT_NO_INLINE_ASM"
Additional search paths can be provided using -DCMAKE_PROGRAM_PATH=<path>
If you have an llvm installation apart from that with patmos,
also the option -DCMAKE_SYSTEM_IGNORE_PATH=<path> might be helpful
( e.g. -DCMAKE_SYSTEM_IGNORE_PATH=$(dirname $(which clang)) ).
Example:
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/patmos-clang-toolchain.cmake
-DCMAKE_PROGRAM_PATH=../../patmos-llvm/build/Debug+Asserts/bin
-DCMAKE_INSTALL_PREFIX=../../patmos-llvm/build/Debug+Asserts/
--------------------------------------------------------------------------------
3. Use it
When patmos-clang invokes llvm-ld, it links compiler-rt automatically to your
application.
Have fun!