File tree 11 files changed +36
-7
lines changed
docker/sparc64-unknown-linux-gnu
11 files changed +36
-7
lines changed Original file line number Diff line number Diff line change 2
2
FROM ubuntu:17.04
3
3
4
4
RUN apt-get update && apt-get install -y --no-install-recommends \
5
- gcc libc6-dev qemu-user ca-certificates \
6
- gcc-sparc64-linux-gnu libc6-dev-sparc64-cross
5
+ curl ca-certificates \
6
+ gcc libc6-dev \
7
+ gcc-sparc64-linux-gnu libc6-dev-sparc64-cross \
8
+ qemu-system-sparc64 openbios-sparc seabios ipxe-qemu \
9
+ p7zip-full cpio
10
+
11
+ COPY linux-sparc64.sh /
12
+ RUN bash /linux-sparc64.sh
13
+
14
+ COPY test-runner-linux /
7
15
8
16
ENV CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_LINKER=sparc64-linux-gnu-gcc \
9
- # TODO: in theory we should execute this, but qemu segfaults immediately
10
- # see https://github.com/rust-lang/libc/issues/822
11
- # CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_RUNNER="qemu-sparc64 -L /usr/sparc64-linux-gnu" \
12
- CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_RUNNER=true \
17
+ CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_RUNNER="/test-runner-linux sparc64" \
13
18
CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
14
19
PATH=$PATH:/rust/bin
Original file line number Diff line number Diff line change
1
+ set -ex
2
+
3
+ mkdir -m 777 /qemu
4
+ cd /qemu
5
+
6
+ curl -LO https://cdimage.debian.org/cdimage/ports/debian-9.0-sparc64-NETINST-1.iso
7
+ 7z e debian-9.0-sparc64-NETINST-1.iso boot/initrd.gz
8
+ 7z e debian-9.0-sparc64-NETINST-1.iso boot/sparc64
9
+ mv sparc64 kernel
10
+ rm debian-9.0-sparc64-NETINST-1.iso
11
+
12
+ mkdir init
13
+ cd init
14
+ gunzip -c ../initrd.gz | cpio -id
15
+ rm ../initrd.gz
16
+ cp /usr/sparc64-linux-gnu/lib/libgcc_s.so.1 usr/lib/
17
+ chmod a+w .
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ pub const O_TRUNC: ::c_int = 512;
50
50
pub const O_NOATIME : :: c_int = 0o1000000 ;
51
51
pub const O_CLOEXEC : :: c_int = 0x80000 ;
52
52
pub const O_PATH : :: c_int = 0o10000000 ;
53
+ pub const O_TMPFILE : :: c_int = 0o20000000 | O_DIRECTORY ;
53
54
54
55
pub const EBFONT : :: c_int = 59 ;
55
56
pub const ENOSTR : :: c_int = 60 ;
Original file line number Diff line number Diff line change @@ -1024,7 +1024,6 @@ pub const ENOATTR: ::c_int = ::ENODATA;
1024
1024
pub const SO_ORIGINAL_DST : :: c_int = 80 ;
1025
1025
pub const IUTF8 : :: tcflag_t = 0x00004000 ;
1026
1026
pub const CMSPAR : :: tcflag_t = 0o10000000000 ;
1027
- pub const O_TMPFILE : :: c_int = 0o20000000 | O_DIRECTORY ;
1028
1027
1029
1028
f ! {
1030
1029
pub fn CPU_ZERO ( cpuset: & mut cpu_set_t) -> ( ) {
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ pub const NCCS: usize = 32;
90
90
pub const O_TRUNC : :: c_int = 512 ;
91
91
pub const O_NOATIME : :: c_int = 0o1000000 ;
92
92
pub const O_CLOEXEC : :: c_int = 0x80000 ;
93
+ pub const O_TMPFILE : :: c_int = 0o20000000 | O_DIRECTORY ;
93
94
94
95
pub const EBFONT : :: c_int = 59 ;
95
96
pub const ENOSTR : :: c_int = 60 ;
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ pub const O_DSYNC: ::c_int = 4096;
87
87
pub const O_FSYNC : :: c_int = 0x101000 ;
88
88
pub const O_NOATIME : :: c_int = 0o1000000 ;
89
89
pub const O_PATH : :: c_int = 0o10000000 ;
90
+ pub const O_TMPFILE : :: c_int = 0o20000000 | O_DIRECTORY ;
90
91
91
92
pub const MAP_GROWSDOWN : :: c_int = 0x0100 ;
92
93
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ pub const O_DSYNC: ::c_int = 4096;
145
145
pub const O_FSYNC : :: c_int = 0x101000 ;
146
146
pub const O_NOATIME : :: c_int = 0o1000000 ;
147
147
pub const O_PATH : :: c_int = 0o10000000 ;
148
+ pub const O_TMPFILE : :: c_int = 0o20000000 | O_DIRECTORY ;
148
149
149
150
pub const MAP_GROWSDOWN : :: c_int = 0x0100 ;
150
151
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ pub const O_DSYNC: ::c_int = 4096;
132
132
pub const O_FSYNC : :: c_int = 0x101000 ;
133
133
pub const O_NOATIME : :: c_int = 0o1000000 ;
134
134
pub const O_PATH : :: c_int = 0o10000000 ;
135
+ pub const O_TMPFILE : :: c_int = 0o20000000 | O_DIRECTORY ;
135
136
136
137
pub const MAP_GROWSDOWN : :: c_int = 0x0100 ;
137
138
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ pub const O_DSYNC: ::c_int = 0x2000;
145
145
pub const O_FSYNC : :: c_int = 0x802000 ;
146
146
pub const O_NOATIME : :: c_int = 0x200000 ;
147
147
pub const O_PATH : :: c_int = 0x1000000 ;
148
+ pub const O_TMPFILE : :: c_int = 0o200000000 | O_DIRECTORY ;
148
149
149
150
pub const MAP_GROWSDOWN : :: c_int = 0x0200 ;
150
151
Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ pub const O_DSYNC: ::c_int = 4096;
249
249
pub const O_FSYNC : :: c_int = 0x101000 ;
250
250
pub const O_NOATIME : :: c_int = 0o1000000 ;
251
251
pub const O_PATH : :: c_int = 0o10000000 ;
252
+ pub const O_TMPFILE : :: c_int = 0o20000000 | O_DIRECTORY ;
252
253
253
254
pub const MAP_GROWSDOWN : :: c_int = 0x0100 ;
254
255
Original file line number Diff line number Diff line change @@ -327,6 +327,7 @@ pub const O_LARGEFILE: ::c_int = 0;
327
327
pub const O_NOATIME : :: c_int = 0o1000000 ;
328
328
pub const O_CLOEXEC : :: c_int = 0x80000 ;
329
329
pub const O_PATH : :: c_int = 0o10000000 ;
330
+ pub const O_TMPFILE : :: c_int = 0o20000000 | O_DIRECTORY ;
330
331
331
332
pub const EBFONT : :: c_int = 59 ;
332
333
pub const ENOSTR : :: c_int = 60 ;
You can’t perform that action at this time.
0 commit comments