diff --git a/.travis.yml b/.travis.yml index 841de44b89b8d..8b0b69f3d5552 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,9 @@ matrix: - env: TARGET=arm-unknown-linux-gnueabihf - env: TARGET=armv7-unknown-linux-gnueabihf - env: TARGET=aarch64-unknown-linux-gnu + - env: TARGET=powerpc-unknown-linux-gnu + - env: TARGET=powerpc64-unknown-linux-gnu + - env: TARGET=powerpc64le-unknown-linux-gnu - os: osx env: TARGET=i686-apple-darwin script: ci/run.sh diff --git a/ci/docker/powerpc-unknown-linux-gnu/Dockerfile b/ci/docker/powerpc-unknown-linux-gnu/Dockerfile new file mode 100644 index 0000000000000..b30b240aa0df6 --- /dev/null +++ b/ci/docker/powerpc-unknown-linux-gnu/Dockerfile @@ -0,0 +1,12 @@ +FROM ubuntu:17.10 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc libc6-dev qemu-user ca-certificates \ + gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \ + qemu-system-ppc \ + make \ + file + +ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \ + CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc -L /usr/powerpc-linux-gnu" \ + OBJDUMP=powerpc-linux-gnu-objdump diff --git a/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile b/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile new file mode 100644 index 0000000000000..7757ad28a42d5 --- /dev/null +++ b/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:17.10 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + ca-certificates \ + libc6-dev \ + gcc-powerpc64-linux-gnu \ + libc6-dev-ppc64-cross \ + qemu-user \ + qemu-system-ppc \ + make \ + file + +ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \ + CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc64 -L /usr/powerpc64-linux-gnu" \ + CC=powerpc64-linux-gnu-gcc \ + OBJDUMP=powerpc64-linux-gnu-objdump diff --git a/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile b/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile new file mode 100644 index 0000000000000..0b0c214fdf1b7 --- /dev/null +++ b/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:17.10 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc libc6-dev qemu-user ca-certificates \ + gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross \ + qemu-system-ppc file make + +ENV CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER=powerpc64le-linux-gnu-gcc \ + CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc64le -L /usr/powerpc64le-linux-gnu" \ + CC=powerpc64le-linux-gnu-gcc \ + OBJDUMP=powerpc64le-linux-gnu-objdump diff --git a/ci/dox.sh b/ci/dox.sh index 9b412757c84cd..f70e8cc93a1da 100755 --- a/ci/dox.sh +++ b/ci/dox.sh @@ -24,13 +24,18 @@ dox() { cargo build --target $target - rustdoc --target $target -o target/doc/$arch src/lib.rs --crate-name stdsimd --library-path target/$target/debug/deps + rustdoc --target $target \ + -o target/doc/$arch src/lib.rs \ + --crate-name stdsimd \ + --library-path target/$target/debug/deps } dox i686 i686-unknown-linux-gnu dox x86_64 x86_64-unknown-linux-gnu dox arm armv7-unknown-linux-gnueabihf dox aarch64 aarch64-unknown-linux-gnu +dox powerpc powerpc-unknown-linux-gnu +dox powerpc64 powerpc64-unknown-linux-gnu # If we're on travis, not a PR, and on the right branch, publish! if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then diff --git a/src/lib.rs b/src/lib.rs index f7138966b41b0..cacf2af1ba302 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -138,7 +138,10 @@ extern crate coresimd; pub mod vendor { pub use coresimd::vendor::*; - #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] + #[cfg(all(target_os = "linux", + any(target_arch = "arm", + target_arch = "aarch64", + target_arch = "powerpc64")))] pub use super::runtime::{__unstable_detect_feature, __Feature}; } @@ -147,6 +150,9 @@ pub mod simd { pub use coresimd::simd::*; } -#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] +#[cfg(all(target_os = "linux", + any(target_arch = "arm", + target_arch = "aarch64", + target_arch = "powerpc64")))] #[macro_use] mod runtime;