Skip to content

Change gcc-multilib to use i686 gcc compiler. #983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 \
Copy link
Contributor Author

@Alexhuszagh Alexhuszagh Jul 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i586 should actually continue to use multilib, since there is no native Linux image for it, nor support for this architecture anymore in Debian stable (it isn't even supported in oldoldstable, since it was no longer supported in stretch).

On second thought, it's probably better to support cross-compilation to i586 from aarch64, ppc64le, and x86_64 images, and just not support this single target on i686.

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