From 827ddeaa26a19e1c67b98414d504eed00a38902e Mon Sep 17 00:00:00 2001 From: Alex Huszagh Date: Fri, 29 Jul 2022 09:54:59 -0500 Subject: [PATCH] Change gcc-multilib to use i686 gcc compiler. --- docker/Dockerfile.i586-unknown-linux-gnu | 16 ++++++++++++++-- docker/Dockerfile.i686-unknown-linux-gnu | 16 ++++++++++++++-- src/docker/remote.rs | 4 ++++ 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile.i586-unknown-linux-gnu b/docker/Dockerfile.i586-unknown-linux-gnu index a4266c044..de2da4e14 100644 --- a/docker/Dockerfile.i586-unknown-linux-gnu +++ b/docker/Dockerfile.i586-unknown-linux-gnu @@ -11,12 +11,24 @@ COPY xargo.sh / RUN /xargo.sh RUN apt-get update && apt-get install --assume-yes --no-install-recommends \ - g++-multilib + g++-i686-linux-gnu \ + libc6-dev-i386-cross + +COPY deny-debian-packages.sh / +RUN TARGET_ARCH=i386 /deny-debian-packages.sh \ + binutils \ + binutils-i686-linux-gnu COPY qemu.sh / RUN /qemu.sh i386 COPY qemu-runner / -ENV CARGO_TARGET_I586_UNKNOWN_LINUX_GNU_RUNNER="/qemu-runner i586" \ +ENV CARGO_TARGET_I586_UNKNOWN_LINUX_GNU_LINKER=i686-linux-gnu-gcc \ + CARGO_TARGET_I586_UNKNOWN_LINUX_GNU_RUNNER="/qemu-runner i586" \ + CC_i586_unknown_linux_gnu=i686-linux-gnu-gcc \ + CXX_i586_unknown_linux_gnu=i686-linux-gnu-g++ \ + BINDGEN_EXTRA_CLANG_ARGS_i586_unknown_linux_gnu="--sysroot=/usr/i686-linux-gnu" \ + QEMU_LD_PREFIX=/usr/i686-linux-gnu \ + RUST_TEST_THREADS=1 \ PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}" diff --git a/docker/Dockerfile.i686-unknown-linux-gnu b/docker/Dockerfile.i686-unknown-linux-gnu index 6d9ed72fa..a5926f118 100644 --- a/docker/Dockerfile.i686-unknown-linux-gnu +++ b/docker/Dockerfile.i686-unknown-linux-gnu @@ -11,7 +11,13 @@ COPY xargo.sh / RUN /xargo.sh RUN apt-get update && apt-get install --assume-yes --no-install-recommends \ - g++-multilib + g++-i686-linux-gnu \ + libc6-dev-i386-cross + +COPY deny-debian-packages.sh / +RUN TARGET_ARCH=i386 /deny-debian-packages.sh \ + binutils \ + binutils-i686-linux-gnu COPY qemu.sh / RUN /qemu.sh i386 softmmu @@ -24,5 +30,11 @@ RUN /linux-image.sh i686 COPY linux-runner / -ENV CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_RUNNER="/linux-runner i686" \ +ENV CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER=i686-linux-gnu-gcc \ + CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_RUNNER="/linux-runner i686" \ + CC_i686_unknown_linux_gnu=i686-linux-gnu-gcc \ + CXX_i686_unknown_linux_gnu=i686-linux-gnu-g++ \ + BINDGEN_EXTRA_CLANG_ARGS_i686_unknown_linux_gnu="--sysroot=/usr/i686-linux-gnu" \ + QEMU_LD_PREFIX=/usr/i686-linux-gnu \ + RUST_TEST_THREADS=1 \ PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}" diff --git a/src/docker/remote.rs b/src/docker/remote.rs index 23215f638..8394beefc 100644 --- a/src/docker/remote.rs +++ b/src/docker/remote.rs @@ -865,6 +865,10 @@ pub(crate) fn run( let mount_prefix = MOUNT_PREFIX; + if options.in_docker() { + msg_info.warn("remote and docker-in-docker are unlikely to work together when using cross. remote cross uses data volumes, so docker-in-docker should not be required.")?; + } + // the logic is broken into the following steps // 1. get our unique identifiers and cleanup from a previous run. // 2. if not using persistent volumes, create a data volume