Skip to content

Commit a3bd4e0

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 + a6b1c2d commit a3bd4e0

File tree

21 files changed

+881
-147
lines changed

21 files changed

+881
-147
lines changed

.travis.yml

Lines changed: 10 additions & 1 deletion
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
Lines changed: 13 additions & 0 deletions
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
Lines changed: 5 additions & 8 deletions
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
Lines changed: 10 additions & 0 deletions
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
Lines changed: 10 additions & 0 deletions
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-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+
PATH=$PATH:/rust/bin

ci/run.sh

Lines changed: 8 additions & 0 deletions
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

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

libc-test/Cargo.toml

Lines changed: 3 additions & 0 deletions
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

Lines changed: 45 additions & 0 deletions
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

Lines changed: 45 additions & 0 deletions
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,

0 commit comments

Comments
 (0)