Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Created April 17, 2024 16:28
Show Gist options
  • Save lupyuen/7e68b69d0d5879f77b1404ae2db6fb9d to your computer and use it in GitHub Desktop.
Save lupyuen/7e68b69d0d5879f77b1404ae2db6fb9d to your computer and use it in GitHub Desktop.
GCC compiles for RISC-V 32-bit (Double-Float). See https://github.com/lupyuen/nuttx-rust-app
$ make --trace
...
## GCC compiles `hello_main.c` to `hello.o`
## for RISC-V 32-bit (Double-Float)
riscv64-unknown-elf-gcc \
-march=rv32imafdc \
-mabi=ilp32d \
-c \
-fno-common \
-Wall \
-Wstrict-prototypes \
-Wshadow \
-Wundef \
-Wno-attributes \
-Wno-unknown-pragmas \
-Wno-psabi \
-Os \
-fno-strict-aliasing \
-fomit-frame-pointer \
-ffunction-sections \
-fdata-sections \
-g \
-isystem nuttx/include \
-D__NuttX__ \
-DNDEBUG \
-pipe \
-I "apps/include" \
-Dmain=hello_main \
hello_main.c \
-o hello_main.c...apps.examples.hello.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment