Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #41059 - TimNN:rollup, r=TimNN
- Loading branch information
Showing
50 changed files
with
1,009 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
# 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 | ||
|
||
hide_output() { | ||
set +x | ||
on_err=" | ||
echo ERROR: An error was encountered with the build. | ||
cat /tmp/build.log | ||
exit 1 | ||
" | ||
trap "$on_err" ERR | ||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & | ||
PING_LOOP_PID=$! | ||
$@ &> /tmp/build.log | ||
rm /tmp/build.log | ||
trap - ERR | ||
kill $PING_LOOP_PID | ||
set -x | ||
} | ||
|
||
mkdir build | ||
cd build | ||
cp ../aarch64-linux-gnu.config .config | ||
ct-ng oldconfig | ||
hide_output ct-ng build | ||
cd .. | ||
rm -rf build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
automake \ | ||
bison \ | ||
bzip2 \ | ||
ca-certificates \ | ||
cmake \ | ||
curl \ | ||
file \ | ||
flex \ | ||
g++ \ | ||
gawk \ | ||
gdb \ | ||
git \ | ||
gperf \ | ||
help2man \ | ||
libncurses-dev \ | ||
libtool-bin \ | ||
make \ | ||
patch \ | ||
python2.7 \ | ||
sudo \ | ||
texinfo \ | ||
wget \ | ||
xz-utils \ | ||
libssl-dev \ | ||
pkg-config | ||
|
||
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 && \ | ||
rm dumb-init_*.deb | ||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
|
||
# Ubuntu 16.04 (this contianer) ships with make 4, but something in the | ||
# toolchains we build below chokes on that, so go back to make 3 | ||
RUN curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf - && \ | ||
cd make-3.81 && \ | ||
./configure --prefix=/usr && \ | ||
make && \ | ||
make install && \ | ||
cd .. && \ | ||
rm -rf make-3.81 | ||
|
||
RUN curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2 | \ | ||
tar xjf - && \ | ||
cd crosstool-ng && \ | ||
./configure --prefix=/usr/local && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
cd .. && \ | ||
rm -rf crosstool-ng | ||
|
||
RUN groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild | ||
RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools | ||
USER rustbuild | ||
WORKDIR /tmp | ||
|
||
COPY arm-linux-gnueabihf.config build-toolchains.sh /tmp/ | ||
RUN ./build-toolchains.sh | ||
|
||
USER root | ||
|
||
RUN curl -o /usr/local/bin/sccache \ | ||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-24-sccache-x86_64-unknown-linux-musl && \ | ||
chmod +x /usr/local/bin/sccache | ||
|
||
ENV PATH=$PATH:/x-tools/arm-unknown-linux-gnueabihf/bin | ||
|
||
ENV CC_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-gcc \ | ||
AR_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-ar \ | ||
CXX_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-g++ | ||
|
||
ENV HOSTS=arm-unknown-linux-gnueabihf | ||
|
||
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended | ||
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
# 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 | ||
|
||
hide_output() { | ||
set +x | ||
on_err=" | ||
echo ERROR: An error was encountered with the build. | ||
cat /tmp/build.log | ||
exit 1 | ||
" | ||
trap "$on_err" ERR | ||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & | ||
PING_LOOP_PID=$! | ||
$@ &> /tmp/build.log | ||
rm /tmp/build.log | ||
trap - ERR | ||
kill $PING_LOOP_PID | ||
set -x | ||
} | ||
|
||
mkdir build | ||
cd build | ||
cp ../arm-linux-gnueabihf.config .config | ||
ct-ng oldconfig | ||
hide_output ct-ng build | ||
cd .. | ||
rm -rf build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
automake \ | ||
bison \ | ||
bzip2 \ | ||
ca-certificates \ | ||
cmake \ | ||
curl \ | ||
file \ | ||
flex \ | ||
g++ \ | ||
gawk \ | ||
gdb \ | ||
git \ | ||
gperf \ | ||
help2man \ | ||
libncurses-dev \ | ||
libtool-bin \ | ||
make \ | ||
patch \ | ||
python2.7 \ | ||
sudo \ | ||
texinfo \ | ||
wget \ | ||
xz-utils \ | ||
libssl-dev \ | ||
pkg-config | ||
|
||
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 && \ | ||
rm dumb-init_*.deb | ||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
|
||
# Ubuntu 16.04 (this contianer) ships with make 4, but something in the | ||
# toolchains we build below chokes on that, so go back to make 3 | ||
RUN curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf - && \ | ||
cd make-3.81 && \ | ||
./configure --prefix=/usr && \ | ||
make && \ | ||
make install && \ | ||
cd .. && \ | ||
rm -rf make-3.81 | ||
|
||
RUN curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2 | \ | ||
tar xjf - && \ | ||
cd crosstool-ng && \ | ||
./configure --prefix=/usr/local && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
cd .. && \ | ||
rm -rf crosstool-ng | ||
|
||
RUN groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild | ||
RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools | ||
USER rustbuild | ||
WORKDIR /tmp | ||
|
||
COPY build-toolchains.sh armv7-linux-gnueabihf.config /tmp/ | ||
RUN ./build-toolchains.sh | ||
|
||
USER root | ||
|
||
RUN curl -o /usr/local/bin/sccache \ | ||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-24-sccache-x86_64-unknown-linux-musl && \ | ||
chmod +x /usr/local/bin/sccache | ||
|
||
ENV PATH=$PATH:/x-tools/armv7-unknown-linux-gnueabihf/bin | ||
|
||
ENV CC_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-gcc \ | ||
AR_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-ar \ | ||
CXX_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-g++ | ||
|
||
ENV HOSTS=armv7-unknown-linux-gnueabihf | ||
|
||
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended | ||
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.