-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathDockerfile.toolchain
36 lines (31 loc) · 1.26 KB
/
Dockerfile.toolchain
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
FROM scratch
MAINTAINER Peter Marheine <[email protected]>
FROM debian:bullseye-slim AS prereqs
RUN apt-get -qq update
RUN apt-get -y install build-essential libmpfr-dev libmpc-dev libgmp-dev libpng-dev ppl-dev curl git cmake texinfo
FROM prereqs AS binutils
WORKDIR /
RUN curl -L http://ftpmirror.gnu.org/binutils/binutils-2.34.tar.bz2 | tar xj
RUN mkdir build-binutils
WORKDIR /build-binutils
RUN ../binutils-2.34/configure --target=sh3eb-elf --disable-nls \
--with-sysroot
RUN make -j$(nproc)
RUN make install
FROM binutils AS gcc
WORKDIR /
RUN curl -L http://ftpmirror.gnu.org/gcc/gcc-10.1.0/gcc-10.1.0.tar.xz | tar xJ
RUN mkdir build-gcc
WORKDIR /build-gcc
RUN ../gcc-10.1.0/configure --target=sh3eb-elf --with-pkgversion=PrizmSDK \
--without-headers --enable-languages=c,c++ \
--disable-tls --disable-nls --disable-threads --disable-shared \
--disable-libssp --disable-libvtv --disable-libada \
--with-endian=big --with-multilib-list=
RUN make -j$(nproc) inhibit_libc=true all-gcc
RUN make install-gcc
RUN make -j$(nproc) inhibit_libc=true all-target-libgcc
RUN make install-target-libgcc
FROM debian:bullseye-slim
COPY --from=gcc /usr/local /usr/local
RUN apt-get -qq update && apt-get -qqy install make libmpc3 && apt-get -qqy clean