forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#39111 - alexcrichton:more-cross-targets, r=…
…brson travis: Expand the `cross` linux image This expands the `cross` travis matrix entry with a few more targets that our nightlies are building: * x86_64-rumprun-netbsd * arm-unknown-linux-musleabi * arm-unknown-linux-musleabihf * armv7-unknown-linux-musleabihf * mips-unknown-linux-musl * mipsel-unknown-linux-musl This commit doesn't compile custom toolchains like our current cross-image does, but instead compiles musl manually and then compiles libunwind manually (like x86_64) for use for the ARM targets and just uses openwrt toolchains for the mips targets. cc rust-lang#38531
- Loading branch information
Showing
20 changed files
with
243 additions
and
86 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
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.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
#!/bin/sh | ||
# 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 | ||
|
||
MUSL=1.1.16 | ||
|
||
curl -O https://www.musl-libc.org/releases/musl-$MUSL.tar.gz | ||
tar xf musl-$MUSL.tar.gz | ||
cd musl-$MUSL | ||
CC=arm-linux-gnueabi-gcc \ | ||
CFLAGS="-march=armv6 -marm" \ | ||
./configure \ | ||
--prefix=/usr/local/arm-linux-musleabi \ | ||
--enable-wrapper=gcc | ||
make -j$(nproc) | ||
make install | ||
cd .. | ||
rm -rf musl-$MUSL | ||
|
||
tar xf musl-$MUSL.tar.gz | ||
cd musl-$MUSL | ||
CC=arm-linux-gnueabihf-gcc \ | ||
CFLAGS="-march=armv6 -marm" \ | ||
./configure \ | ||
--prefix=/usr/local/arm-linux-musleabihf \ | ||
--enable-wrapper=gcc | ||
make -j$(nproc) | ||
make install | ||
cd .. | ||
rm -rf musl-$MUSL | ||
|
||
tar xf musl-$MUSL.tar.gz | ||
cd musl-$MUSL | ||
CC=arm-linux-gnueabihf-gcc \ | ||
CFLAGS="-march=armv7-a" \ | ||
./configure \ | ||
--prefix=/usr/local/armv7-linux-musleabihf \ | ||
--enable-wrapper=gcc | ||
make -j$(nproc) | ||
make install | ||
cd .. | ||
rm -rf musl-$MUSL* | ||
|
||
ln -nsf ../arm-linux-musleabi/bin/musl-gcc /usr/local/bin/arm-linux-musleabi-gcc | ||
ln -nsf ../arm-linux-musleabihf/bin/musl-gcc /usr/local/bin/arm-linux-musleabihf-gcc | ||
ln -nsf ../armv7-linux-musleabihf/bin/musl-gcc /usr/local/bin/armv7-linux-musleabihf-gcc | ||
|
||
|
||
curl -L https://github.com/llvm-mirror/llvm/archive/release_39.tar.gz | tar xzf - | ||
curl -L https://github.com/llvm-mirror/libunwind/archive/release_39.tar.gz | tar xzf - | ||
|
||
mkdir libunwind-build | ||
cd libunwind-build | ||
cmake ../libunwind-release_39 \ | ||
-DLLVM_PATH=/tmp/llvm-release_39 \ | ||
-DLIBUNWIND_ENABLE_SHARED=0 \ | ||
-DCMAKE_C_COMPILER=arm-linux-gnueabi-gcc \ | ||
-DCMAKE_CXX_COMPILER=arm-linux-gnueabi-g++ \ | ||
-DCMAKE_C_FLAGS="-march=armv6 -marm" \ | ||
-DCMAKE_CXX_FLAGS="-march=armv6 -marm" | ||
make -j$(nproc) | ||
cp lib/libunwind.a /usr/local/arm-linux-musleabi/lib | ||
cd .. | ||
rm -rf libunwind-build | ||
|
||
mkdir libunwind-build | ||
cd libunwind-build | ||
cmake ../libunwind-release_39 \ | ||
-DLLVM_PATH=/tmp/llvm-release_39 \ | ||
-DLIBUNWIND_ENABLE_SHARED=0 \ | ||
-DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc \ | ||
-DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \ | ||
-DCMAKE_C_FLAGS="-march=armv6 -marm" \ | ||
-DCMAKE_CXX_FLAGS="-march=armv6 -marm" | ||
make -j$(nproc) | ||
cp lib/libunwind.a /usr/local/arm-linux-musleabihf/lib | ||
cd .. | ||
rm -rf libunwind-build | ||
|
||
mkdir libunwind-build | ||
cd libunwind-build | ||
cmake ../libunwind-release_39 \ | ||
-DLLVM_PATH=/tmp/llvm-release_39 \ | ||
-DLIBUNWIND_ENABLE_SHARED=0 \ | ||
-DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc \ | ||
-DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \ | ||
-DCMAKE_C_FLAGS="-march=armv7-a" \ | ||
-DCMAKE_CXX_FLAGS="-march=armv7-a" | ||
make -j$(nproc) | ||
cp lib/libunwind.a /usr/local/armv7-linux-musleabihf/lib | ||
cd .. | ||
rm -rf libunwind-build | ||
|
||
rm -rf libunwind-release_39 | ||
rm -rf llvm-release_39 |
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,39 @@ | ||
#!/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 | ||
trap - ERR | ||
kill $PING_LOOP_PID | ||
rm /tmp/build.log | ||
set -x | ||
} | ||
|
||
|
||
git clone https://github.com/rumpkernel/rumprun | ||
cd rumprun | ||
git reset --hard 39a97f37a85e44c69b662f6b97b688fbe892603b | ||
git submodule update --init | ||
|
||
CC=cc hide_output ./build-rr.sh -d /usr/local hw | ||
cd .. | ||
rm -rf rumprun |
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
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
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
Oops, something went wrong.