1#
2# Docker ppc64el cross-compiler target
3#
4# This docker target builds on the debian Stretch base image.
5#
6FROM qemu:debian10
7
8# Add the foreign architecture we want and install dependencies
9RUN dpkg --add-architecture ppc64el && \
10    apt update && \
11    apt install -yy crossbuild-essential-ppc64el
12
13RUN apt update && \
14    DEBIAN_FRONTEND=noninteractive eatmydata \
15    apt build-dep -yy -a ppc64el --arch-only qemu
16
17# Specify the cross prefix for this image (see tests/docker/common.rc)
18ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
19ENV DEF_TARGET_LIST ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
20
21# Install extra libraries to increase code coverage
22RUN apt update && \
23    DEBIAN_FRONTEND=noninteractive eatmydata \
24    apt install -y --no-install-recommends \
25        libbz2-dev:ppc64el \
26        liblzo2-dev:ppc64el \
27        librdmacm-dev:ppc64el \
28        libsnappy-dev:ppc64el
29