Skip to content

Commit af23c1e

Browse files
authored
Auto merge of #365 - alexcrichton:more-arch, r=alexcrichton
Add more architectures to libc-test * `i686-unknown-linux-musl` * `powerpc-unknown-linux-gnu` * `powerpc64-unknown-linux-gnu` cc @japaric cc rust-lang/rust#36006
2 parents 85ac087 + d00f432 commit af23c1e

File tree

22 files changed

+885
-150
lines changed

22 files changed

+885
-150
lines changed

.travis.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ matrix:
5555
- os: linux
5656
env: TARGET=x86_64-unknown-linux-musl
5757
rust: stable
58+
- os: linux
59+
env: TARGET=i686-unknown-linux-musl
60+
rust: stable
5861
- os: linux
5962
env: TARGET=arm-unknown-linux-gnueabihf
6063
rust: stable
@@ -70,6 +73,12 @@ matrix:
7073
- os: linux
7174
env: TARGET=x86_64-rumprun-netbsd
7275
rust: stable
76+
- os: linux
77+
env: TARGET=powerpc-unknown-linux-gnu
78+
rust: stable
79+
- os: linux
80+
env: TARGET=powerpc64-unknown-linux-gnu
81+
rust: stable
7382

7483
# beta
7584
- os: linux
@@ -104,4 +113,4 @@ matrix:
104113
notifications:
105114
email:
106115
on_success: never
107-
webhooks: http://buildbot.rust-lang.org/homu/travis
116+
webhooks: https://buildbot.rust-lang.org/homu/travis

appveyor.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ environment:
77
- TARGET: x86_64-pc-windows-msvc
88
- TARGET: i686-pc-windows-msvc
99
install:
10-
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
11-
- rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
12-
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
10+
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
11+
- rustup-init.exe -y --default-host %TARGET%
12+
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
1313
- if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin
1414
- rustc -V
1515
- cargo -V
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update
4+
RUN apt-get install -y --no-install-recommends \
5+
gcc make libc6-dev git curl ca-certificates
6+
RUN curl https://www.musl-libc.org/releases/musl-1.1.14.tar.gz | \
7+
tar xzf - && \
8+
cd musl-1.1.14 && \
9+
CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
10+
make install -j4 && \
11+
cd .. && \
12+
rm -rf musl-1.1.14
13+
ENV PATH=$PATH:/musl-i686/bin:/rust/bin
+5-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
FROM ubuntu:15.10
1+
FROM ubuntu:16.04
22

33
RUN apt-get update
44
RUN apt-get install -y --no-install-recommends \
5-
software-properties-common gcc libc6-dev qemu-user
6-
RUN add-apt-repository ppa:angelsl/mips-cross
7-
RUN apt-get update
8-
RUN apt-get install -y --no-install-recommends \
9-
gcc-5-mips-linux-gnu libc6-dev-mips-cross
5+
gcc libc6-dev qemu-user ca-certificates \
6+
gcc-mips-linux-gnu libc6-dev-mips-cross \
7+
qemu-system-mips
108

11-
ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc-5 \
12-
CC_mips_unknown_linux_gnu=mips-linux-gnu-gcc-5 \
9+
ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
1310
PATH=$PATH:/rust/bin
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update
4+
RUN apt-get install -y --no-install-recommends \
5+
gcc libc6-dev qemu-user ca-certificates \
6+
gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \
7+
qemu-system-ppc
8+
9+
ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \
10+
PATH=$PATH:/rust/bin
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update
4+
RUN apt-get install -y --no-install-recommends \
5+
gcc libc6-dev qemu-user ca-certificates \
6+
gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross \
7+
qemu-system-ppc
8+
9+
ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \
10+
CC=powerpc64-linux-gnu-gcc \
11+
PATH=$PATH:/rust/bin

ci/run.sh

+8
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ case "$TARGET" in
117117
qemu-mips -L /usr/mips-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
118118
;;
119119

120+
powerpc-unknown-linux-gnu)
121+
qemu-ppc -L /usr/powerpc-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
122+
;;
123+
124+
powerpc64-unknown-linux-gnu)
125+
qemu-ppc64 -L /usr/powerpc64-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
126+
;;
127+
120128
aarch64-unknown-linux-gnu)
121129
qemu-aarch64 -L /usr/aarch64-linux-gnu/ $CARGO_TARGET_DIR/$TARGET/debug/libc-test
122130
;;

libc-test/Cargo.lock

+11-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libc-test/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ libc = { path = ".." }
99

1010
[build-dependencies]
1111
ctest = { git = "https://github.com/alexcrichton/ctest" }
12+
13+
[replace]
14+
"gcc:0.3.35" = { git = "https://github.com/alexcrichton/gcc-rs" }

src/unix/notbsd/android/mod.rs

+45
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,51 @@ pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
533533
pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
534534
pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
535535

536+
pub const MCL_CURRENT: ::c_int = 0x0001;
537+
pub const MCL_FUTURE: ::c_int = 0x0002;
538+
539+
pub const SIGSTKSZ: ::size_t = 8192;
540+
pub const CBAUD: ::tcflag_t = 0o0010017;
541+
pub const TAB1: ::c_int = 0x00000800;
542+
pub const TAB2: ::c_int = 0x00001000;
543+
pub const TAB3: ::c_int = 0x00001800;
544+
pub const CR1: ::c_int = 0x00000200;
545+
pub const CR2: ::c_int = 0x00000400;
546+
pub const CR3: ::c_int = 0x00000600;
547+
pub const FF1: ::c_int = 0x00008000;
548+
pub const BS1: ::c_int = 0x00002000;
549+
pub const VT1: ::c_int = 0x00004000;
550+
pub const VWERASE: usize = 14;
551+
pub const VREPRINT: usize = 12;
552+
pub const VSUSP: usize = 10;
553+
pub const VSTART: usize = 8;
554+
pub const VSTOP: usize = 9;
555+
pub const VDISCARD: usize = 13;
556+
pub const VTIME: usize = 5;
557+
pub const IXON: ::tcflag_t = 0x00000400;
558+
pub const IXOFF: ::tcflag_t = 0x00001000;
559+
pub const ONLCR: ::tcflag_t = 0x4;
560+
pub const CSIZE: ::tcflag_t = 0x00000030;
561+
pub const CS6: ::tcflag_t = 0x00000010;
562+
pub const CS7: ::tcflag_t = 0x00000020;
563+
pub const CS8: ::tcflag_t = 0x00000030;
564+
pub const CSTOPB: ::tcflag_t = 0x00000040;
565+
pub const CREAD: ::tcflag_t = 0x00000080;
566+
pub const PARENB: ::tcflag_t = 0x00000100;
567+
pub const PARODD: ::tcflag_t = 0x00000200;
568+
pub const HUPCL: ::tcflag_t = 0x00000400;
569+
pub const CLOCAL: ::tcflag_t = 0x00000800;
570+
pub const ECHOKE: ::tcflag_t = 0x00000800;
571+
pub const ECHOE: ::tcflag_t = 0x00000010;
572+
pub const ECHOK: ::tcflag_t = 0x00000020;
573+
pub const ECHONL: ::tcflag_t = 0x00000040;
574+
pub const ECHOPRT: ::tcflag_t = 0x00000400;
575+
pub const ECHOCTL: ::tcflag_t = 0x00000200;
576+
pub const ISIG: ::tcflag_t = 0x00000001;
577+
pub const ICANON: ::tcflag_t = 0x00000002;
578+
pub const PENDIN: ::tcflag_t = 0x00004000;
579+
pub const NOFLSH: ::tcflag_t = 0x00000080;
580+
536581
f! {
537582
pub fn sigemptyset(set: *mut sigset_t) -> ::c_int {
538583
*set = 0;

src/unix/notbsd/linux/mips.rs

+45
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,51 @@ pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
550550

551551
pub const SYS_gettid: ::c_long = 4222; // Valid for O32
552552

553+
pub const MCL_CURRENT: ::c_int = 0x0001;
554+
pub const MCL_FUTURE: ::c_int = 0x0002;
555+
556+
pub const SIGSTKSZ: ::size_t = 8192;
557+
pub const CBAUD: ::tcflag_t = 0o0010017;
558+
pub const TAB1: ::c_int = 0x00000800;
559+
pub const TAB2: ::c_int = 0x00001000;
560+
pub const TAB3: ::c_int = 0x00001800;
561+
pub const CR1: ::c_int = 0x00000200;
562+
pub const CR2: ::c_int = 0x00000400;
563+
pub const CR3: ::c_int = 0x00000600;
564+
pub const FF1: ::c_int = 0x00008000;
565+
pub const BS1: ::c_int = 0x00002000;
566+
pub const VT1: ::c_int = 0x00004000;
567+
pub const VWERASE: usize = 14;
568+
pub const VREPRINT: usize = 12;
569+
pub const VSUSP: usize = 10;
570+
pub const VSTART: usize = 8;
571+
pub const VSTOP: usize = 9;
572+
pub const VDISCARD: usize = 13;
573+
pub const VTIME: usize = 5;
574+
pub const IXON: ::tcflag_t = 0x00000400;
575+
pub const IXOFF: ::tcflag_t = 0x00001000;
576+
pub const ONLCR: ::tcflag_t = 0x4;
577+
pub const CSIZE: ::tcflag_t = 0x00000030;
578+
pub const CS6: ::tcflag_t = 0x00000010;
579+
pub const CS7: ::tcflag_t = 0x00000020;
580+
pub const CS8: ::tcflag_t = 0x00000030;
581+
pub const CSTOPB: ::tcflag_t = 0x00000040;
582+
pub const CREAD: ::tcflag_t = 0x00000080;
583+
pub const PARENB: ::tcflag_t = 0x00000100;
584+
pub const PARODD: ::tcflag_t = 0x00000200;
585+
pub const HUPCL: ::tcflag_t = 0x00000400;
586+
pub const CLOCAL: ::tcflag_t = 0x00000800;
587+
pub const ECHOKE: ::tcflag_t = 0x00000800;
588+
pub const ECHOE: ::tcflag_t = 0x00000010;
589+
pub const ECHOK: ::tcflag_t = 0x00000020;
590+
pub const ECHONL: ::tcflag_t = 0x00000040;
591+
pub const ECHOPRT: ::tcflag_t = 0x00000400;
592+
pub const ECHOCTL: ::tcflag_t = 0x00000200;
593+
pub const ISIG: ::tcflag_t = 0x00000001;
594+
pub const ICANON: ::tcflag_t = 0x00000002;
595+
pub const PENDIN: ::tcflag_t = 0x00004000;
596+
pub const NOFLSH: ::tcflag_t = 0x00000080;
597+
553598
#[link(name = "util")]
554599
extern {
555600
pub fn sysctl(name: *mut ::c_int,

src/unix/notbsd/linux/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,20 @@ s! {
6666

6767
pub struct pthread_mutex_t {
6868
#[cfg(any(target_arch = "mips", target_arch = "mipsel",
69-
target_arch = "arm"))]
69+
target_arch = "arm", target_arch = "powerpc"))]
7070
__align: [::c_long; 0],
7171
#[cfg(not(any(target_arch = "mips", target_arch = "mipsel",
72-
target_arch = "arm")))]
72+
target_arch = "arm", target_arch = "powerpc")))]
7373
__align: [::c_longlong; 0],
7474
size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
7575
}
7676

7777
pub struct pthread_rwlock_t {
7878
#[cfg(any(target_arch = "mips", target_arch = "mipsel",
79-
target_arch = "arm"))]
79+
target_arch = "arm", target_arch = "powerpc"))]
8080
__align: [::c_long; 0],
8181
#[cfg(not(any(target_arch = "mips", target_arch = "mipsel",
82-
target_arch = "arm")))]
82+
target_arch = "arm", target_arch = "powerpc")))]
8383
__align: [::c_longlong; 0],
8484
size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
8585
}

src/unix/notbsd/linux/musl/mod.rs

+45
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,51 @@ pub const RTLD_NOLOAD: ::c_int = 0x4;
186186
pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
187187
pub const CLOCK_TAI: ::clockid_t = 11;
188188

189+
pub const MCL_CURRENT: ::c_int = 0x0001;
190+
pub const MCL_FUTURE: ::c_int = 0x0002;
191+
192+
pub const SIGSTKSZ: ::size_t = 8192;
193+
pub const CBAUD: ::tcflag_t = 0o0010017;
194+
pub const TAB1: ::c_int = 0x00000800;
195+
pub const TAB2: ::c_int = 0x00001000;
196+
pub const TAB3: ::c_int = 0x00001800;
197+
pub const CR1: ::c_int = 0x00000200;
198+
pub const CR2: ::c_int = 0x00000400;
199+
pub const CR3: ::c_int = 0x00000600;
200+
pub const FF1: ::c_int = 0x00008000;
201+
pub const BS1: ::c_int = 0x00002000;
202+
pub const VT1: ::c_int = 0x00004000;
203+
pub const VWERASE: usize = 14;
204+
pub const VREPRINT: usize = 12;
205+
pub const VSUSP: usize = 10;
206+
pub const VSTART: usize = 8;
207+
pub const VSTOP: usize = 9;
208+
pub const VDISCARD: usize = 13;
209+
pub const VTIME: usize = 5;
210+
pub const IXON: ::tcflag_t = 0x00000400;
211+
pub const IXOFF: ::tcflag_t = 0x00001000;
212+
pub const ONLCR: ::tcflag_t = 0x4;
213+
pub const CSIZE: ::tcflag_t = 0x00000030;
214+
pub const CS6: ::tcflag_t = 0x00000010;
215+
pub const CS7: ::tcflag_t = 0x00000020;
216+
pub const CS8: ::tcflag_t = 0x00000030;
217+
pub const CSTOPB: ::tcflag_t = 0x00000040;
218+
pub const CREAD: ::tcflag_t = 0x00000080;
219+
pub const PARENB: ::tcflag_t = 0x00000100;
220+
pub const PARODD: ::tcflag_t = 0x00000200;
221+
pub const HUPCL: ::tcflag_t = 0x00000400;
222+
pub const CLOCAL: ::tcflag_t = 0x00000800;
223+
pub const ECHOKE: ::tcflag_t = 0x00000800;
224+
pub const ECHOE: ::tcflag_t = 0x00000010;
225+
pub const ECHOK: ::tcflag_t = 0x00000020;
226+
pub const ECHONL: ::tcflag_t = 0x00000040;
227+
pub const ECHOPRT: ::tcflag_t = 0x00000400;
228+
pub const ECHOCTL: ::tcflag_t = 0x00000200;
229+
pub const ISIG: ::tcflag_t = 0x00000001;
230+
pub const ICANON: ::tcflag_t = 0x00000002;
231+
pub const PENDIN: ::tcflag_t = 0x00004000;
232+
pub const NOFLSH: ::tcflag_t = 0x00000080;
233+
189234
extern {
190235
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
191236
pub fn ptrace(request: ::c_int, ...) -> ::c_long;

0 commit comments

Comments
 (0)