Skip to content

Commit f0d6b1a

Browse files
bors[bot]malbarbo
andcommitted
Merge #206
206: Fix build issues r=Dylan-DPC a=malbarbo This fixes almost all current build issues. Only two issues are left: - thumb* tests, which requires using https://github.com/japaric/utest instead of https://github.com/japaric/cortest - netbsd build, which is failing with libc linking issues Co-authored-by: Marco A L Barbosa <[email protected]>
2 parents d248721 + e22a562 commit f0d6b1a

File tree

15 files changed

+152
-154
lines changed

15 files changed

+152
-154
lines changed

.travis.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,21 @@ matrix:
3535
- env: TARGET=x86_64-linux-android CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
3636

3737
# OSX
38-
- env: TARGET=i686-apple-darwin DYLIB=1 STD=1 RUN=1
38+
- env: TARGET=i686-apple-darwin CPP=1 DYLIB=1 STD=1 RUN=1
3939
os: osx
40-
- env: TARGET=x86_64-apple-darwin DYLIB=1 STD=1 RUN=1 DEPLOY=1
40+
- env: TARGET=x86_64-apple-darwin CPP=1 DYLIB=1 STD=1 RUN=1 DEPLOY=1
4141
os: osx
4242

4343
# BSD
44+
# FIXME: freebsd fails to link when CPP=1
4445
- env: TARGET=i686-unknown-freebsd DYLIB=1 STD=1 OPENSSL=0.7.17
45-
- env: TARGET=x86_64-unknown-dragonfly DYLIB=1 OPENSSL=0.5.5
46+
- env: TARGET=x86_64-unknown-dragonfly CPP=1 DYLIB=1 OPENSSL=0.5.5
4647
- env: TARGET=x86_64-unknown-freebsd DYLIB=1 STD=1 OPENSSL=0.5.5
47-
- env: TARGET=x86_64-unknown-netbsd DYLIB=1 STD=1 OPENSSL=0.7.17
48+
- env: TARGET=x86_64-unknown-netbsd CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17
4849

4950
# Solaris
50-
- env: TARGET=sparcv9-sun-solaris DYLIB=1 STD=1 OPENSSL=0.7.17
51-
- env: TARGET=x86_64-sun-solaris DYLIB=1 STD=1 OPENSSL=0.7.17
51+
- env: TARGET=sparcv9-sun-solaris CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17
52+
- env: TARGET=x86_64-sun-solaris CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17
5253

5354
# Windows
5455
- env: TARGET=x86_64-pc-windows-gnu CPP=1 STD=1 RUN=1
@@ -61,10 +62,16 @@ matrix:
6162
rust: nightly-2017-10-24
6263

6364
# Bare metal
64-
- env: TARGET=thumbv6m-none-eabi RUN=1
65-
- env: TARGET=thumbv7em-none-eabi RUN=1
66-
- env: TARGET=thumbv7em-none-eabihf RUN=1
67-
- env: TARGET=thumbv7m-none-eabi RUN=1
65+
- env: TARGET=thumbv6m-none-eabi STD=1
66+
- env: TARGET=thumbv7em-none-eabi STD=1
67+
- env: TARGET=thumbv7em-none-eabihf STD=1
68+
- env: TARGET=thumbv7m-none-eabi STD=1
69+
70+
71+
before_install:
72+
# workaround for https://github.com/travis-ci/travis-ci/issues/4704
73+
- python3 -c 'import os,sys; os.set_blocking(sys.stdout.fileno(), True)'
74+
6875

6976
install:
7077
- curl https://sh.rustup.rs -sSf |

Cargo.lock

Lines changed: 56 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ repository = "https://github.com/japaric/cross"
1010
version = "0.1.15-dev"
1111

1212
[dependencies]
13-
error-chain = "0.7.1"
14-
lazy_static = "0.2"
13+
error-chain = "0.12"
14+
lazy_static = "1.0"
1515
libc = "0.2.18"
1616
rustc_version = "0.2.1"
17-
semver = "0.6.0"
17+
semver = "0.9.0"
1818
toml = "0.2.1"

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ worst, "hang" (never terminate).
202202
| `asmjs-unknown-emscripten` [4] | 1.1.15 | 1.37.13 | N/A || N/A ||
203203
| `i586-unknown-linux-gnu` | 2.23 | 5.3.1 | 1.0.2m || N/A ||
204204
| `i686-linux-android` [5] | N/A | 4.9 | 1.0.2m || N/A ||
205-
| `i686-pc-windows-gnu` | N/A | 6.2.0 | N/A || N/A ||
206-
| `i686-unknown-freebsd` [1] | 10.2 | 5.3.0 | 1.0.2m | | N/A | |
205+
| `i686-pc-windows-gnu` | N/A | 7.3.0 | N/A || N/A ||
206+
| `i686-unknown-freebsd` [1] | 10.2 | 5.3.0 | 1.0.2m | | N/A | |
207207
| `i686-unknown-linux-gnu` | 2.15 | 4.6.2 | 1.0.2m || N/A ||
208208
| `i686-unknown-linux-musl` | 1.1.15 | 5.3.1 | 1.0.2m | | N/A ||
209209
| `mips-unknown-linux-gnu` | 2.23 | 5.3.1 | 1.0.2m || 2.8.0 ||
@@ -222,10 +222,10 @@ worst, "hang" (never terminate).
222222
| `thumbv7m-none-eabi` [3] | 2.2.0 | 5.3.1 | N/A | | N/A | |
223223
| `wasm32-unknown-emscripten` [4] | 1.1.15 | 1.37.13 | N/A || N/A ||
224224
| `x86_64-linux-android` [5] | N/A | 4.9 | 1.0.2m || N/A ||
225-
| `x86_64-pc-windows-gnu` | N/A | 6.2.0 | N/A || N/A ||
225+
| `x86_64-pc-windows-gnu` | N/A | 7.3.0 | N/A || N/A ||
226226
| `x86_64-sun-solaris` [1] | 2.11 | 5.3.0 | 1.0.2m || N/A | |
227227
| `x86_64-unknown-dragonfly` [1] [2] | 4.6.0 | 5.3.0 | 1.0.2m || N/A | |
228-
| `x86_64-unknown-freebsd` [1] | 10.2 | 5.3.0 | 1.0.2m | | N/A | |
228+
| `x86_64-unknown-freebsd` [1] | 10.2 | 5.3.0 | 1.0.2m | | N/A | |
229229
| `x86_64-unknown-linux-gnu` | 2.15 | 4.6.2 | 1.0.2m || N/A ||
230230
| `x86_64-unknown-linux-musl` | 1.1.15 | 5.3.1 | 1.0.2m | | N/A ||
231231
| `x86_64-unknown-netbsd`[1] | 7.0 | 5.3.0 | 1.0.2m || N/A | |

ci/script.sh

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,6 @@ main() {
2626
rm -rf $td
2727
fi
2828

29-
# `cross run` test for thumb targets
30-
case $TARGET in
31-
thumb*-none-eabi*)
32-
td=$(mktemp -d)
33-
34-
git clone \
35-
--depth 1 \
36-
--recursive \
37-
https://github.com/japaric/cortest $td
38-
39-
pushd $td
40-
cross run --target $TARGET --example hello --release
41-
popd
42-
43-
rm -rf $td
44-
;;
45-
esac
46-
4729
# `cross build` test for targets where `std` is not available
4830
if [ -z "$STD" ]; then
4931
td=$(mktemp -d)
@@ -88,12 +70,14 @@ EOF
8870
popd
8971

9072
rm -rf $td
91-
else
73+
elif [[ "$TARGET" != thumb* ]]; then
9274
td=$(mktemp -d)
9375

9476
git clone --depth 1 https://github.com/japaric/xargo $td
9577

9678
pushd $td
79+
sed -i -e 's/#!\[deny(warnings)\]//g' src/main.rs
80+
sed -i -e 's/unused_doc_comment/unused_doc_comments/g' src/errors.rs
9781
cross build --target $TARGET
9882
popd
9983

@@ -112,30 +96,46 @@ EOF
11296
$td
11397

11498
pushd $td
115-
cross test \
116-
--no-default-features \
117-
--features "gen-tests mangled-names" \
118-
--target $TARGET
99+
cross test --manifest-path testcrate/Cargo.toml --target $TARGET
119100
popd
120101

121102
rm -rf $td
122103
fi
123104

124105
# `cross run` test
125-
td=$(mktemp -d)
126-
127-
cargo init --bin --name hello $td
106+
case $TARGET in
107+
thumb*-none-eabi*)
108+
td=$(mktemp -d)
109+
110+
git clone \
111+
--depth 1 \
112+
--recursive \
113+
https://github.com/japaric/cortest $td
114+
115+
pushd $td
116+
cross run --target $TARGET --example hello --release
117+
popd
118+
119+
rm -rf $td
120+
;;
121+
*)
122+
td=$(mktemp -d)
123+
124+
cargo init --bin --name hello $td
125+
126+
pushd $td
127+
mkdir examples tests
128+
echo "fn main() { println!(\"Example!\"); }" > examples/e.rs
129+
echo "#[test] fn t() {}" > tests/t.rs
130+
cross run --target $TARGET
131+
cross run --target $TARGET --example e
132+
cross test --target $TARGET
133+
popd
134+
135+
rm -rf $td
136+
;;
137+
esac
128138

129-
pushd $td
130-
mkdir examples tests
131-
echo "fn main() { println!(\"Example!\"); }" > examples/e.rs
132-
echo "#[test] fn t() {}" > tests/t.rs
133-
cross run --target $TARGET
134-
cross run --target $TARGET --example e
135-
cross test --target $TARGET
136-
popd
137-
138-
rm -rf $td
139139
fi
140140

141141
# Test C++ support

docker/dragonfly.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ main() {
4040
pushd $td
4141

4242
cd gcc
43+
sed -i -e 's/ftp:/https:/g' ./contrib/download_prerequisites
4344
./contrib/download_prerequisites
4445
patch -p0 <<'EOF'
4546
--- libatomic/configure.tgt.orig 2015-07-09 16:08:55 UTC

0 commit comments

Comments
 (0)