Prebuilt runtime libraries
The prebuilt runtime libraries are configured for different combinations of these options:
The C/C++ library (DLIB or Libc++)
Base integer instruction set—RV32E, RV32I, or RV64I
Support for multiplication and division instructions
Support for atomic operations
FPU support
Support for compressed instructions
Library configuration—Normal or Full.
The linker will automatically include the correct library files and library configuration file. To explicitly specify a library configuration, use the ‑‑dlib_config compiler option. However, the Full library configuration is the only configuration that exists for Libc++. The ‑‑dlib_config compiler option cannot be used to specify another configuration.
Note
The prebuilt runtime libraries for the RV64I instruction set are built using the Medany code model, but are compatible with both code models.
Tip
To see which runtime library files that the linker includes, use the linker option ‑‑log libraries, see ‑‑log.
Library filename syntax
The names of the prebuilt runtime libraries consist of two main elements, separated by a hyphen (-), for example, canx-rv32ic, dl-rv32imc, and dllibcppmathf-rv32im. The first element—before the hyphen—describes the kind of library and type of feature support, and the second element—after the hyphen—describes which RISC-V core extensions that are supported, where fx and dx correspond to the Zfinx and Zdinx extensions, respectively. Note that some kinds of libraries support more core extensions than are explicitly indicated by the filename.
First element of library name | Kind of library and feature support |
|---|---|
| A handful of carefully tailored string functions that make use of the AndeStar™ V5 Performance extension for RV32. If the linker’s automatic library selection is not used, this library should be specified before the standard |
| Functions that support atomic operations. |
| String and memory routines for the Zbb bitmanip extension. |
| Functions that initialize the interrupt vector table before the execution reaches the main function. The appropriate library will be used if the linker option |
| Functions for C-SPY emulated I/O. |
| Functions for debug I/O that follow the RISC-V semihosting specification. See also The semihosting mechanism. |
| Libraries with a default interrupt handler. |
| Functions defined by Standard C, for example functions like |
| C standard library functions in the Full ( |
| Libc++ functions defined by C++, compiled with support for C++17. This kind of library only exists in the Full DLIB configuration. |
| Libc++ mathematical functions defined by C++, compiled with support for C++17. This kind of library only exists in the Full DLIB configuration. |
| C standard library mathematical functions. |
| The C standard library mathematical functions in the Full ( |
| Functions defined by C++, compiled with support for C++14, in the Full ( |
| Thread support functions in the Full ( |
| Timezone and daylight saving time functions. |
For example, the library dlmathn-rv32imdc. contains C standard library mathematical functions in the Normal DLIB configuration, for RV32IMDC and RV32IMDAC cores.
You can find the library object files in the directory riscv\lib\ and the library configuration files in the directory riscv\inc\c\.