From 3e87c81a02640d7d456d75ddf6fee66f6d21fb8d Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Mon, 24 Apr 2023 16:10:53 -0700 Subject: [PATCH] add Dockerfile (note) Note that we are not adding a docker build GitHub/GitTea action due to the extreme resource requirements of the build --- Dockerfile | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9e530d6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,70 @@ +# need bookworm for most up to date cmake +FROM debian:bookworm as build + +RUN true && \ + apt-get update && \ + apt-get install -y \ + autoconf \ + automake \ + autotools-dev \ + curl \ + python3 \ + libmpc-dev \ + libmpfr-dev \ + libgmp-dev \ + gawk \ + build-essential \ + bison \ + flex \ + texinfo \ + gperf \ + libtool \ + patchutils \ + bc \ + zlib1g-dev \ + libexpat-dev \ + git \ + && \ + git clone --recurse-submodules https://github.com/T-head-Semi/xuantie-gnu-toolchain && \ + cd xuantie-gnu-toolchain && \ + ./configure --prefix=/usr/local --enable-multilib && \ + make -j8 && \ + cd / && \ + rm -rf xuantie-gnu-toolchain && \ + apt-get remove -y \ + autoconf \ + automake \ + autotools-dev \ + curl \ + python3 \ + libmpc-dev \ + libmpfr-dev \ + libgmp-dev \ + gawk \ + build-essential \ + bison \ + flex \ + texinfo \ + gperf \ + libtool \ + patchutils \ + bc \ + zlib1g-dev \ + libexpat-dev \ + git \ + && \ + apt-get clean && \ + true + +FROM debian:bookworm + +COPY --from=build /usr/local/bin/* /usr/local/bin/ +COPY --from=build /usr/local/riscv64-unknown-elf /usr/local/ + +RUN true && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + cmake \ + && \ + apt-get clean && \ + true