Skip to content

Commit

Permalink
Auto merge of #157 - gnzlbg:i586, r=<try>
Browse files Browse the repository at this point in the history
add support for i586-unknown-linux-gnu

Closes #156 .
  • Loading branch information
homunkulus committed Nov 18, 2017
2 parents 11504da + 81f03cd commit 6a7bee8
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 42 deletions.
85 changes: 43 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,64 +7,65 @@ sudo: required
matrix:
include:
# Linux
- env: TARGET=aarch64-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=arm-unknown-linux-gnueabi CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=arm-unknown-linux-musleabi STD=1 RUN=1
- env: TARGET=armv7-unknown-linux-gnueabihf CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=armv7-unknown-linux-musleabihf STD=1 RUN=1
- env: TARGET=i686-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=i686-unknown-linux-musl STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=mips-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=mips64-unknown-linux-gnuabi64 CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17 RUN=1
- env: TARGET=mips64el-unknown-linux-gnuabi64 CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17 RUN=1
- env: TARGET=mipsel-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=powerpc-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=powerpc64-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17 RUN=1
- env: TARGET=powerpc64le-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17 RUN=1
- env: TARGET=s390x-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17
- env: TARGET=sparc64-unknown-linux-gnu CPP=1 DYLIB=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=x86_64-unknown-linux-gnu CPP=1 DYLIB=1 OPENSSL=0.5.5 RUN=1 DEPLOY=1
- env: TARGET=x86_64-unknown-linux-musl STD=1 OPENSSL=0.5.5 RUN=1 DEPLOY=1
# - env: TARGET=aarch64-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=arm-unknown-linux-gnueabi CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=arm-unknown-linux-musleabi STD=1 RUN=1
# - env: TARGET=armv7-unknown-linux-gnueabihf CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=armv7-unknown-linux-musleabihf STD=1 RUN=1
- env: TARGET=i586-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=i686-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=i686-unknown-linux-musl STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=mips-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=mips64-unknown-linux-gnuabi64 CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17 RUN=1
# - env: TARGET=mips64el-unknown-linux-gnuabi64 CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17 RUN=1
# - env: TARGET=mipsel-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=powerpc-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=powerpc64-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17 RUN=1
# - env: TARGET=powerpc64le-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17 RUN=1
# - env: TARGET=s390x-unknown-linux-gnu CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17
# - env: TARGET=sparc64-unknown-linux-gnu CPP=1 DYLIB=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=x86_64-unknown-linux-gnu CPP=1 DYLIB=1 OPENSSL=0.5.5 RUN=1 DEPLOY=1
# - env: TARGET=x86_64-unknown-linux-musl STD=1 OPENSSL=0.5.5 RUN=1 DEPLOY=1

# Android
- env: TARGET=aarch64-linux-android CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=arm-linux-androideabi CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=armv7-linux-androideabi CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=aarch64-linux-android CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=arm-linux-androideabi CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=armv7-linux-androideabi CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
# NOTE RUN=1 missing due to issue #143
- env: TARGET=i686-linux-android CPP=1 STD=1 OPENSSL=0.5.5
- env: TARGET=x86_64-linux-android CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
# - env: TARGET=i686-linux-android CPP=1 STD=1 OPENSSL=0.5.5
# - env: TARGET=x86_64-linux-android CPP=1 STD=1 OPENSSL=0.5.5 RUN=1

# OSX
- env: TARGET=i686-apple-darwin DYLIB=1 STD=1 RUN=1
os: osx
- env: TARGET=x86_64-apple-darwin DYLIB=1 STD=1 RUN=1 DEPLOY=1
os: osx
# - env: TARGET=i686-apple-darwin DYLIB=1 STD=1 RUN=1
# os: osx
# - env: TARGET=x86_64-apple-darwin DYLIB=1 STD=1 RUN=1 DEPLOY=1
# os: osx

# BSD
- env: TARGET=i686-unknown-freebsd DYLIB=1 STD=1 OPENSSL=0.7.17
- env: TARGET=x86_64-unknown-dragonfly DYLIB=1 OPENSSL=0.5.5
- env: TARGET=x86_64-unknown-freebsd DYLIB=1 STD=1 OPENSSL=0.5.5
- env: TARGET=x86_64-unknown-netbsd DYLIB=1 STD=1 OPENSSL=0.7.17
# - env: TARGET=i686-unknown-freebsd DYLIB=1 STD=1 OPENSSL=0.7.17
# - env: TARGET=x86_64-unknown-dragonfly DYLIB=1 OPENSSL=0.5.5
# - env: TARGET=x86_64-unknown-freebsd DYLIB=1 STD=1 OPENSSL=0.5.5
# - env: TARGET=x86_64-unknown-netbsd DYLIB=1 STD=1 OPENSSL=0.7.17

# Solaris
- env: TARGET=sparcv9-sun-solaris DYLIB=1 STD=1 OPENSSL=0.7.17
- env: TARGET=x86_64-sun-solaris DYLIB=1 STD=1 OPENSSL=0.7.17
# - env: TARGET=sparcv9-sun-solaris DYLIB=1 STD=1 OPENSSL=0.7.17
# - env: TARGET=x86_64-sun-solaris DYLIB=1 STD=1 OPENSSL=0.7.17

# Windows
- env: TARGET=x86_64-pc-windows-gnu CPP=1 STD=1 RUN=1
- env: TARGET=i686-pc-windows-gnu CPP=1 STD=1 RUN=1
# - env: TARGET=x86_64-pc-windows-gnu CPP=1 STD=1 RUN=1
# - env: TARGET=i686-pc-windows-gnu CPP=1 STD=1 RUN=1

# Emscripten
- env: TARGET=asmjs-unknown-emscripten CPP=1 STD=1 RUN=1
- env: TARGET=wasm32-unknown-emscripten CPP=1 STD=1 RUN=1
# - env: TARGET=asmjs-unknown-emscripten CPP=1 STD=1 RUN=1
# - env: TARGET=wasm32-unknown-emscripten CPP=1 STD=1 RUN=1
# work around rust-lang/cargo#4689
rust: nightly-2017-10-24
# rust: nightly-2017-10-24

# Bare metal
- env: TARGET=thumbv6m-none-eabi RUN=1
- env: TARGET=thumbv7em-none-eabi RUN=1
- env: TARGET=thumbv7em-none-eabihf RUN=1
- env: TARGET=thumbv7m-none-eabi RUN=1
# - env: TARGET=thumbv6m-none-eabi RUN=1
# - env: TARGET=thumbv7em-none-eabi RUN=1
# - env: TARGET=thumbv7em-none-eabihf RUN=1
# - env: TARGET=thumbv7m-none-eabi RUN=1

install:
- curl https://sh.rustup.rs -sSf |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

- Add support for the `i586-unknown-linux-gnu` target.

## [v0.1.13] - 2017-11-08

### Added
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ worst, "hang" (never terminate).
| `armv7-unknown-linux-gnueabihf` | 2.15 | 4.6.2 | 1.0.2m || 2.8.0 ||
| `armv7-unknown-linux-musleabihf` | 1.1.15 | 5.3.1 | N/A | | 2.8.0 ||
| `asmjs-unknown-emscripten` [4] | 1.1.15 | 1.37.13 | N/A || N/A ||
| `i586-unknown-linux-gnu` | 2.15 | 4.6.2 | 1.0.2m || N/A ||
| `i686-linux-android` [5] | N/A | 4.9 | 1.0.2m || N/A ||
| `i686-pc-windows-gnu` | N/A | 6.2.0 | N/A || N/A ||
| `i686-unknown-freebsd` [1] | 10.2 | 5.3.0 | 1.0.2m | | N/A | |
Expand Down
26 changes: 26 additions & 0 deletions docker/i586-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ubuntu:12.04

RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
gcc \
libc6-dev \
make \
pkg-config

COPY xargo.sh /
RUN bash /xargo.sh

COPY cmake.sh /
RUN apt-get purge --auto-remove -y cmake && \
bash /cmake.sh 2.8.11

COPY openssl.sh /
RUN apt-get install -y --no-install-recommends \
g++-multilib && \
bash /openssl.sh linux-elf "" -m32

ENV OPENSSL_DIR=/openssl \
OPENSSL_INCLUDE_DIR=/openssl/include \
OPENSSL_LIB_DIR=/openssl/lib
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ pub enum Target {
ArmUnknownLinuxMusleabi,
Armv7UnknownLinuxGnueabihf,
Armv7UnknownLinuxMusleabihf,
I586UnknownLinuxGnu,
I686UnknownLinuxGnu,
I686UnknownLinuxMusl,
Mips64UnknownLinuxGnuabi64,
Expand Down Expand Up @@ -199,6 +200,7 @@ impl Target {
Target::ArmUnknownLinuxMusleabi |
Target::Armv7UnknownLinuxGnueabihf |
Target::Armv7UnknownLinuxMusleabihf |
Target::I586UnknownLinuxGnu |
Target::I686UnknownLinuxGnu |
Target::I686UnknownLinuxMusl |
Target::Mips64UnknownLinuxGnuabi64 |
Expand Down Expand Up @@ -236,6 +238,7 @@ impl Target {
!triple.starts_with("i586") &&
!triple.starts_with("i686")
}
Target::I586UnknownLinuxGnu |
Target::I686UnknownLinuxGnu |
Target::I686UnknownLinuxMusl |
Target::X86_64UnknownLinuxGnu |
Expand All @@ -262,6 +265,7 @@ impl Target {
Armv7UnknownLinuxGnueabihf => "armv7-unknown-linux-gnueabihf",
Armv7UnknownLinuxMusleabihf => "armv7-unknown-linux-musleabihf",
AsmjsUnknownEmscripten => "asmjs-unknown-emscripten",
I586UnknownLinuxGnu => "i586-unknown-linux-gnu",
I686AppleDarwin => "i686-apple-darwin",
I686LinuxAndroid => "i686-linux-android",
I686PcWindowsGnu => "i686-pc-windows-gnu",
Expand Down Expand Up @@ -314,6 +318,7 @@ impl Target {
"armv7-unknown-linux-gnueabihf" => Armv7UnknownLinuxGnueabihf,
"armv7-unknown-linux-musleabihf" => Armv7UnknownLinuxMusleabihf,
"asmjs-unknown-emscripten" => AsmjsUnknownEmscripten,
"i586-unknown-linux-gnu" => I586UnknownLinuxGnu,
"i686-apple-darwin" => I686AppleDarwin,
"i686-linux-android" => I686LinuxAndroid,
"i686-pc-windows-gnu" => I686PcWindowsGnu,
Expand Down

0 comments on commit 6a7bee8

Please sign in to comment.