]>
Commit | Line | Data |
---|---|---|
afbdf0a4 ADF |
1 | # |
2 | # Docker Hexagon cross-compiler target | |
3 | # | |
4 | # This docker target is used for building hexagon tests. As it also | |
581cd47f AB |
5 | # needs to be able to build QEMU itself in CI we include its |
6 | # build-deps. | |
afbdf0a4 | 7 | # |
581cd47f | 8 | FROM docker.io/library/debian:11-slim |
afbdf0a4 | 9 | |
b9052d36 MT |
10 | # Duplicate deb line as deb-src |
11 | RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list | |
12 | RUN apt-get update && \ | |
afbdf0a4 ADF |
13 | DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ |
14 | DEBIAN_FRONTEND=noninteractive eatmydata \ | |
b9052d36 MT |
15 | # Install common build utilities |
16 | apt-get install -y --no-install-recommends \ | |
17 | curl \ | |
2f7350cd | 18 | ccache \ |
b9052d36 | 19 | xz-utils \ |
581cd47f | 20 | ca-certificates \ |
b9052d36 | 21 | bison \ |
afbdf0a4 | 22 | flex \ |
b9052d36 | 23 | git \ |
a22a4b29 | 24 | ninja-build \ |
7ace2193 PB |
25 | python3-pip \ |
26 | python3-setuptools \ | |
27 | python3-venv \ | |
28 | python3-wheel && \ | |
afbdf0a4 | 29 | # Install QEMU build deps for use in CI |
afbdf0a4 | 30 | DEBIAN_FRONTEND=noninteractive eatmydata \ |
2f7350cd DB |
31 | apt build-dep -yy --arch-only qemu && \ |
32 | mkdir -p /usr/libexec/ccache-wrappers && \ | |
33 | ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \ | |
34 | ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ | |
35 | ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \ | |
36 | ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc | |
b9052d36 | 37 | |
7ace2193 | 38 | RUN /usr/bin/pip3 install tomli |
b9052d36 MT |
39 | |
40 | ENV TOOLCHAIN_INSTALL /opt | |
17ed7cec | 41 | ENV TOOLCHAIN_RELEASE 12.Dec.2023 |
b9052d36 | 42 | ENV TOOLCHAIN_BASENAME "clang+llvm-${TOOLCHAIN_RELEASE}-cross-hexagon-unknown-linux-musl" |
17ed7cec | 43 | ENV TOOLCHAIN_URL https://codelinaro.jfrog.io/artifactory/codelinaro-toolchain-for-hexagon/${TOOLCHAIN_RELEASE}/${TOOLCHAIN_BASENAME}.tar.xz |
2f7350cd | 44 | ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" |
b9052d36 MT |
45 | |
46 | RUN curl -#SL "$TOOLCHAIN_URL" | tar -xJC "$TOOLCHAIN_INSTALL" | |
47 | ENV PATH $PATH:${TOOLCHAIN_INSTALL}/${TOOLCHAIN_BASENAME}/x86_64-linux-gnu/bin | |
bad7a275 | 48 | ENV MAKE /usr/bin/make |
93bd2954 AB |
49 | # As a final step configure the user (if env is defined) |
50 | ARG USER | |
51 | ARG UID | |
52 | RUN if [ "${USER}" ]; then \ | |
53 | id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi |