You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
947 B

  1. # Dockerfile to build Risc-V toolchain for
  2. # rv32i instruction set and ilp32 ABI
  3. # Useful to compile for NEORV32 target
  4. FROM debian:buster-slim as riscv-gcc
  5. # Get dependencies
  6. RUN apt-get update -qq && \
  7. DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
  8. ca-certificates \
  9. autoconf \
  10. automake \
  11. autotools-dev \
  12. curl \
  13. python3 \
  14. libmpc-dev \
  15. libmpfr-dev \
  16. libgmp-dev \
  17. gawk \
  18. build-essential \
  19. bison \
  20. flex \
  21. texinfo \
  22. gperf \
  23. libtool \
  24. patchutils \
  25. bc \
  26. zlib1g-dev \
  27. libexpat-dev \
  28. git && \
  29. apt-get autoclean && apt-get clean && apt-get -y autoremove && \
  30. update-ca-certificates && \
  31. rm -rf /var/lib/apt/lists/* && \
  32. cd /root && \
  33. git clone https://github.com/riscv/riscv-gnu-toolchain && \
  34. cd riscv-gnu-toolchain && \
  35. ./configure --prefix=/opt/riscv-gcc --with-arch=rv32i --with-abi=ilp32 && \
  36. make