1
1
FROM debian:stable
2
2
3
+ SHELL ["/bin/bash" , "-c" ]
4
+
3
5
RUN dpkg --add-architecture i386 && \
4
6
dpkg --add-architecture s390x && \
5
7
dpkg --add-architecture armhf && \
@@ -9,7 +11,7 @@ RUN dpkg --add-architecture i386 && \
9
11
# dkpg-dev: to make pkg-config work in cross-builds
10
12
# llvm: for llvm-symbolizer, which is used by clang's UBSan for symbolized stack traces
11
13
RUN apt-get update && apt-get install --no-install-recommends -y \
12
- git ca-certificates \
14
+ git ca-certificates wget \
13
15
make automake libtool pkg-config dpkg-dev valgrind qemu-user \
14
16
gcc clang llvm libclang-rt-dev libc6-dbg \
15
17
g++ \
@@ -23,6 +25,38 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
23
25
sagemath
24
26
25
27
WORKDIR /root
28
+
29
+ # Build and install gcc snapshot
30
+ ARG GCC_SNAPSHOT_MAJOR=14
31
+ RUN wget --progress=dot:giga --https-only --recursive --accept '*.tar.xz' --level 1 --no-directories "https://gcc.gnu.org/pub/gcc/snapshots/LATEST-${GCC_SNAPSHOT_MAJOR}" && \
32
+ wget "https://gcc.gnu.org/pub/gcc/snapshots/LATEST-${GCC_SNAPSHOT_MAJOR}/sha512.sum" && \
33
+ sha512sum --check --ignore-missing sha512.sum && \
34
+ # We should have downloaded exactly one tar.xz file
35
+ ls && \
36
+ [[ $(ls *.tar.xz | wc -l) -eq "1" ]] && \
37
+ tar xf *.tar.xz && \
38
+ mkdir gcc-build && cd gcc-build && \
39
+ apt-get update && apt-get install --no-install-recommends -y libgmp-dev libmpfr-dev libmpc-dev flex && \
40
+ ../*/configure --prefix=/opt/gcc-snapshot --enable-languages=c --disable-bootstrap --disable-multilib --without-isl && \
41
+ make -j $(nproc) && \
42
+ make install && \
43
+ ln -s /opt/gcc-snapshot/bin/gcc /usr/bin/gcc-snapshot
44
+
45
+ # Install clang snapshot
46
+ RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
47
+ # Add repository for this Debian release
48
+ . /etc/os-release && echo "deb http://apt.llvm.org/${VERSION_CODENAME} llvm-toolchain-${VERSION_CODENAME} main" >> /etc/apt/sources.list && \
49
+ # Install clang snapshot
50
+ apt-get update && apt-get install --no-install-recommends -y clang && \
51
+ # Remove just the "clang" symlink again
52
+ apt-get remove -y clang && \
53
+ # We should have exactly two clang versions now
54
+ ls /usr/bin/clang* && \
55
+ [[ $(ls /usr/bin/clang-?? | sort | wc -l) -eq "2" ]] && \
56
+ # Create symlinks for them
57
+ ln -s $(ls /usr/bin/clang-?? | sort | tail -1) /usr/bin/clang-snapshot && \
58
+ ln -s $(ls /usr/bin/clang-?? | sort | head -1) /usr/bin/clang
59
+
26
60
# The "wine" package provides a convience wrapper that we need
27
61
RUN apt-get update && apt-get install --no-install-recommends -y \
28
62
git ca-certificates wine64 wine python3-simplejson python3-six msitools winbind procps && \
0 commit comments