mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
scripts: add proper 386 and amd64 target triples and builds
We need these to match the Makefile detection of the right gcc for runc-dmz, as well as making sure that everything builds properly for our cross-i386 tests. While we're at it, add x86 to the list of build targets for release builds (presumably nobody will use it, but since we do test builds of this anyway it probably won't hurt). In addition, clean up the handling of the native architecture build by treating it the same as any other build (ensuring that building runc from a different platform will work the same way regardless of the native architecture). In practice, the build works the same way as before. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
+12
-8
@@ -9,19 +9,15 @@ ARG CRIU_REPO=https://download.opensuse.org/repositories/devel:/tools:/criu/Debi
|
||||
RUN KEYFILE=/usr/share/keyrings/criu-repo-keyring.gpg; \
|
||||
wget -nv $CRIU_REPO/Release.key -O- | gpg --dearmor > "$KEYFILE" \
|
||||
&& echo "deb [signed-by=$KEYFILE] $CRIU_REPO/ /" > /etc/apt/sources.list.d/criu.list \
|
||||
&& dpkg --add-architecture i386 \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
criu \
|
||||
gcc-aarch64-linux-gnu libc-dev-arm64-cross \
|
||||
gcc-arm-linux-gnueabi libc-dev-armel-cross \
|
||||
gcc-arm-linux-gnueabihf libc-dev-armhf-cross \
|
||||
gcc-powerpc64le-linux-gnu libc-dev-ppc64el-cross \
|
||||
gcc-s390x-linux-gnu libc-dev-s390x-cross \
|
||||
gcc-riscv64-linux-gnu libc-dev-riscv64-cross \
|
||||
gcc \
|
||||
gcc-multilib \
|
||||
curl \
|
||||
gawk \
|
||||
gcc \
|
||||
gperf \
|
||||
iptables \
|
||||
jq \
|
||||
@@ -32,6 +28,14 @@ RUN KEYFILE=/usr/share/keyrings/criu-repo-keyring.gpg; \
|
||||
sudo \
|
||||
uidmap \
|
||||
iproute2 \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libc-dev:i386 libgcc-s1:i386 \
|
||||
gcc-aarch64-linux-gnu libc-dev-arm64-cross \
|
||||
gcc-arm-linux-gnueabi libc-dev-armel-cross \
|
||||
gcc-arm-linux-gnueabihf libc-dev-armhf-cross \
|
||||
gcc-powerpc64le-linux-gnu libc-dev-ppc64el-cross \
|
||||
gcc-s390x-linux-gnu libc-dev-s390x-cross \
|
||||
gcc-riscv64-linux-gnu libc-dev-riscv64-cross \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/cache/apt /var/lib/apt/lists/* /etc/apt/sources.list.d/*.list
|
||||
|
||||
@@ -54,7 +58,7 @@ RUN cd /tmp \
|
||||
ARG LIBSECCOMP_VERSION
|
||||
COPY script/seccomp.sh script/lib.sh /tmp/script/
|
||||
RUN mkdir -p /opt/libseccomp \
|
||||
&& /tmp/script/seccomp.sh "$LIBSECCOMP_VERSION" /opt/libseccomp arm64 armel armhf ppc64le riscv64 s390x
|
||||
&& /tmp/script/seccomp.sh "$LIBSECCOMP_VERSION" /opt/libseccomp 386 amd64 arm64 armel armhf ppc64le riscv64 s390x
|
||||
ENV LIBSECCOMP_VERSION=$LIBSECCOMP_VERSION
|
||||
ENV LD_LIBRARY_PATH=/opt/libseccomp/lib
|
||||
ENV PKG_CONFIG_PATH=/opt/libseccomp/lib/pkgconfig
|
||||
|
||||
Reference in New Issue
Block a user