-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (42 loc) · 1.14 KB
/
Copy pathDockerfile
File metadata and controls
53 lines (42 loc) · 1.14 KB
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
FROM ubuntu:20.04 AS base
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -q \
python3 \
build-essential \
&& rm -rf /var/lib/apt/lists/*
FROM base as build_base
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -q \
ca-certificates \
autoconf \
automake \
autotools-dev \
curl \
libmpc-dev \
libmpfr-dev \
libgmp-dev \
gawk \
bison \
flex \
texinfo \
gperf \
libtool \
patchutils \
bc \
zlib1g-dev \
git \
libexpat1-dev \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/riscv/riscv-gnu-toolchain riscv-gnu-toolchain-rv32i && \
cd riscv-gnu-toolchain-rv32i && \
git checkout 411d134 && \
git submodule update --init --recursive && \
mkdir build && \
cd build && \
../configure --with-arch=rv32i --prefix=/opt/riscv32i && \
make -j$(nproc)
FROM base
COPY --from=build_base /opt/riscv32i/ /opt/riscv32i
ENV PATH="/opt/riscv32i/bin:${PATH}"
WORKDIR /build
CMD [ "/bin/bash" ]