Skip to content

Commit

Permalink
Change gcc-multilib to use i686 gcc compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexhuszagh committed Jul 29, 2022
1 parent 843ced9 commit 827ddea
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
16 changes: 14 additions & 2 deletions docker/Dockerfile.i586-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
16 changes: 14 additions & 2 deletions docker/Dockerfile.i686-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
4 changes: 4 additions & 0 deletions src/docker/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 827ddea

Please sign in to comment.