Next: RISC-V-Directives, Up: RISC-V-Dependent [Contents][Index]
The following table lists all available RISC-V specific options.
-fpic-fPICGenerate position-independent code
-fno-picDont generate position-independent code (default)
-march=ISASelect the base isa, as specified by ISA. For example -march=rv32ima. If this option and the architecture attributes arent set, then assembler will check the default configure setting with-arch=ISA.
-misa-spec=ISAspecSelect the default isa spec version. If the version of ISA isnt set by -march, then assembler helps to set the version according to the default chosen spec. If this option isnt set, then assembler will check the default configure setting with-isa-spec=ISAspec.
-mpriv-spec=PRIVspecSelect the privileged spec version. We can decide whether the CSR is valid or not according to the chosen spec. If this option and the privilege attributes arent set, then assembler will check the default configure setting with-priv-spec=PRIVspec.
-mabi=ABISelects the ABI, which is either "ilp32" or "lp64", optionally followed by "f", "d", or "q" to indicate single-precision, double-precision, or quad-precision floating-point calling convention, or none or "e" to indicate the soft-float calling convention ("e" indicates a soft-float RVE ABI).
-mrelaxTake advantage of linker relaxations to reduce the number of instructions required to materialize symbol addresses. (default)
-mno-relaxDont do linker relaxations.
-march-attrGenerate the default contents for the riscv elf attribute section if the .attribute directives are not set. This section is used to record the information that a linker or runtime loader needs to check compatibility. This information includes ISA string, stack alignment requirement, unaligned memory accesses, and the major, minor and revision version of privileged specification.
-mno-arch-attrDont generate the default riscv elf attribute section if the .attribute directives are not set.
-mcsr-checkEnable the CSR checking for the ISA-dependent CRS and the read-only CSR. The ISA-dependent CSR are only valid when the specific ISA is set. The read-only CSR can not be written by the CSR instructions.
-mno-csr-checkDont do CSR checking.
-mlittle-endianGenerate code for a little endian machine.
-mbig-endianGenerate code for a big endian machine.
Next: RISC-V-Directives, Up: RISC-V-Dependent [Contents][Index]