File tree Expand file tree Collapse file tree 5 files changed +19
-11
lines changed Expand file tree Collapse file tree 5 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,6 @@ RUN apt-get install -y --no-install-recommends \
8
8
ENTRYPOINT ["sh" ]
9
9
10
10
ENV PATH=$PATH:/rust/bin \
11
- QEMU=freebsd.qcow2 \
11
+ QEMU=freebsd.qcow2.gz \
12
12
CAN_CROSS=1 \
13
13
CARGO_TARGET_X86_64_UNKNOWN_FREEBSD_LINKER=x86_64-unknown-freebsd10-gcc
Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ RUN apt-get update
4
4
RUN apt-get install -y --no-install-recommends \
5
5
gcc libc6-dev qemu qemu-kvm curl ca-certificates kmod cpu-checker
6
6
ENV PATH=$PATH:/rust/bin \
7
- QEMU=openbsd.qcow2
7
+ QEMU=2016-09-07/ openbsd-6.0-without-pkgs .qcow2
Original file line number Diff line number Diff line change @@ -19,10 +19,7 @@ export CARGO_TARGET_DIR=/tmp
19
19
20
20
case $TARGET in
21
21
* -openbsd)
22
- pkg_add rust curl gcc-4.8.4p4
23
- curl https://static.rust-lang.org/cargo-dist/2015-04-02/cargo-nightly-x86_64-unknown-openbsd.tar.gz | \
24
- tar xzf - -C /tmp
25
- export PATH=$PATH :/tmp/cargo-nightly-x86_64-unknown-openbsd/cargo/bin
22
+ pkg_add cargo gcc%4.9 rust
26
23
export CC=egcc
27
24
;;
28
25
Original file line number Diff line number Diff line change @@ -16,9 +16,21 @@ TARGET=$1
16
16
if [ " $QEMU " != " " ]; then
17
17
tmpdir=/tmp/qemu-img-creation
18
18
mkdir -p $tmpdir
19
- if [ ! -f $tmpdir /$QEMU ]; then
20
- curl https://people.mozilla.org/~acrichton/libc-test/qemu/$QEMU .gz | \
21
- gunzip -d > $tmpdir /$QEMU
19
+
20
+ if [ -z " ${QEMU#* .gz} " ]; then
21
+ # image is .gz : download and uncompress it
22
+ qemufile=$( echo ${QEMU% .gz} | sed ' s/\//__/g' )
23
+ if [ ! -f $tmpdir /$qemufile ]; then
24
+ curl https://people.mozilla.org/~acrichton/libc-test/qemu/$QEMU | \
25
+ gunzip -d > $tmpdir /$qemufile
26
+ fi
27
+ else
28
+ # plain qcow2 image: just download it
29
+ qemufile=$( echo ${QEMU} | sed ' s/\//__/g' )
30
+ if [ ! -f $tmpdir /$qemufile ]; then
31
+ curl https://people.mozilla.org/~acrichton/libc-test/qemu/$QEMU \
32
+ > $tmpdir /$qemufile
33
+ fi
22
34
fi
23
35
24
36
# Create a mount a fresh new filesystem image that we'll later pass to QEMU.
@@ -80,7 +92,7 @@ if [ "$QEMU" != "" ]; then
80
92
$program \
81
93
-m 1024 \
82
94
-snapshot \
83
- -drive if=virtio,file=$tmpdir /$QEMU \
95
+ -drive if=virtio,file=$tmpdir /$qemufile \
84
96
-drive if=virtio,file=$tmpdir /libc-test.img \
85
97
-net nic,model=virtio \
86
98
-net user \
Original file line number Diff line number Diff line change @@ -360,7 +360,6 @@ pub const KERN_OSVERSION: ::c_int = 27;
360
360
pub const KERN_SOMAXCONN : :: c_int = 28 ;
361
361
pub const KERN_SOMINCONN : :: c_int = 29 ;
362
362
pub const KERN_USERMOUNT : :: c_int = 30 ;
363
- pub const KERN_RND : :: c_int = 31 ;
364
363
pub const KERN_NOSUIDCOREDUMP : :: c_int = 32 ;
365
364
pub const KERN_FSYNC : :: c_int = 33 ;
366
365
pub const KERN_SYSVMSG : :: c_int = 34 ;
You can’t perform that action at this time.
0 commit comments