-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (50 loc) · 1.85 KB
/
Dockerfile
File metadata and controls
55 lines (50 loc) · 1.85 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
54
55
FROM docker.io/debian:trixie
RUN apt update && apt install -y \
build-essential \
binutils \
git \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
bison \
flex \
bc \
libssl-dev \
python3 \
rsync \
cpio \
wget \
qemu-user \
gdb-multiarch \
parallel \
cgdb
RUN apt update && apt install -y \
e2fsprogs libarchive13t64 locales-all
RUN apt update && apt install -y \
libgnutls28-dev
RUN apt update && apt install -y ccache
RUN apt update && apt install -y clang-tools
RUN ln -s /usr/bin/intercept-build-* /usr/bin/intercept-build
RUN apt update && apt install -y pigz
# Need recent uftrace, which implements dump --srcline (81fe3b94782)
# uftrace v0.19 contains the needed changes.
RUN sed -e 's/Types: deb/Types: deb deb-src/' -i /etc/apt/sources.list.d/debian.sources
RUN apt update && apt build-dep -y uftrace
RUN cd /tmp && git clone https://github.com/p-b-o/uftrace && \
cd uftrace && git checkout d6d243b67183624b6ad07ab77bf419b08ae4a4bb && \
./configure && make -j $(nproc) && make install && rm -rf /tmp/*
RUN apt update && apt install -y black mypy node-typescript
RUN wget -q https://github.com/biomejs/biome/releases/download/@biomejs/biome@2.4.5/biome-linux-x64 && \
mv biome-linux-x64 /usr/bin/biome && chmod +x /usr/bin/biome
# wrap compilers to call ccache, keep frame pointer, and enable debug info
RUN mkdir /opt/compiler_wrappers && \
for c in gcc g++ aarch64-linux-gnu-gcc aarch64-linux-gnu-g++; do \
f=/opt/compiler_wrappers/$c && \
echo '#!/usr/bin/env bash' >> $f && \
echo 'args="-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g"' >> $f && \
echo '[ "$CC_NO_DEBUG_MACROS" == "1" ] || args="$args -ggdb3"' >> $f && \
echo '[[ "$*" =~ ' -E ' ]] && args=' >> $f && \
echo "exec ccache /usr/bin/$c \"\$@\" \$args" >> $f && \
chmod +x $f;\
done
ENV PATH=/opt/compiler_wrappers:$PATH
ENV LANG=en_US.UTF-8