Skip to content

Commit

Permalink
Add redox build to cross
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Aug 14, 2017
1 parent 6d8520d commit 9a76934
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
11 changes: 9 additions & 2 deletions src/ci/docker/cross/Dockerfile
Expand Up @@ -19,7 +19,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2 \
patch \
libssl-dev \
pkg-config
pkg-config \
software-properties-common \
apt-transport-https

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh
Expand All @@ -38,6 +40,9 @@ RUN ./install-mips-musl.sh
COPY cross/install-mipsel-musl.sh /tmp/
RUN ./install-mipsel-musl.sh

COPY cross/install-x86_64-redox.sh /tmp/
RUN ./install-x86_64-redox.sh

ENV TARGETS=asmjs-unknown-emscripten
ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
ENV TARGETS=$TARGETS,x86_64-rumprun-netbsd
Expand All @@ -47,10 +52,12 @@ ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi
ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf
ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf
ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu
ENV TARGETS=$TARGETS,x86_64-unknown-redox

ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc
CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc

# Suppress some warnings in the openwrt toolchains we downloaded
ENV STAGING_DIR=/tmp
Expand Down
16 changes: 16 additions & 0 deletions src/ci/docker/cross/install-x86_64-redox.sh
@@ -0,0 +1,16 @@
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.

set -ex

apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F
add-apt-repository -y 'deb https://static.redox-os.org/toolchain/apt /'
apt-get update
apt-get install -y x86-64-unknown-redox-gcc
8 changes: 4 additions & 4 deletions src/ci/docker/dist-x86_64-redox/Dockerfile
Expand Up @@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F && \
add-apt-repository -y 'deb https://static.redox-os.org/toolchain/apt /' && \
apt-get update && \
apt-get install -y x86-64-elf-redox-gcc
apt-get install -y x86-64-unknown-redox-gcc

RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
dpkg -i dumb-init_*.deb && \
Expand All @@ -34,9 +34,9 @@ RUN curl -o /usr/local/bin/sccache \
chmod +x /usr/local/bin/sccache

ENV \
AR_x86_64_unknown_redox=x86_64-elf-redox-ar \
CC_x86_64_unknown_redox=x86_64-elf-redox-gcc \
CXX_x86_64_unknown_redox=x86_64-elf-redox-g++
AR_x86_64_unknown_redox=x86_64-unknown-redox-ar \
CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc \
CXX_x86_64_unknown_redox=x86_64-unknown-redox-g++

ENV RUST_CONFIGURE_ARGS --target=x86_64-unknown-redox --enable-extended
ENV SCRIPT python2.7 ../x.py dist --target x86_64-unknown-redox

0 comments on commit 9a76934

Please sign in to comment.