From ae1f3d5a7f094969525fe9a6b53398abda635766 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Tue, 14 Nov 2017 16:44:42 +0100 Subject: [PATCH] add i586-unknown-linux-gnu target Closes #156 . --- .travis.yml | 1 + CHANGELOG.md | 2 ++ README.md | 1 + docker/i586-unknown-linux-gnu/Dockerfile | 26 ++++++++++++++++++++++++ src/main.rs | 5 +++++ 5 files changed, 35 insertions(+) create mode 100644 docker/i586-unknown-linux-gnu/Dockerfile diff --git a/.travis.yml b/.travis.yml index 6902a2f87..89975729c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ matrix: - 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9567a6bf6..7ae059e6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 36db76828..a685d4202 100644 --- a/README.md +++ b/README.md @@ -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.23 | 5.3.1 | 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 | | diff --git a/docker/i586-unknown-linux-gnu/Dockerfile b/docker/i586-unknown-linux-gnu/Dockerfile new file mode 100644 index 000000000..5f0500340 --- /dev/null +++ b/docker/i586-unknown-linux-gnu/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu:16.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 diff --git a/src/main.rs b/src/main.rs index 7c8b77d22..586b1732a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,6 +98,7 @@ pub enum Target { ArmUnknownLinuxMusleabi, Armv7UnknownLinuxGnueabihf, Armv7UnknownLinuxMusleabihf, + I586UnknownLinuxGnu, I686UnknownLinuxGnu, I686UnknownLinuxMusl, Mips64UnknownLinuxGnuabi64, @@ -199,6 +200,7 @@ impl Target { Target::ArmUnknownLinuxMusleabi | Target::Armv7UnknownLinuxGnueabihf | Target::Armv7UnknownLinuxMusleabihf | + Target::I586UnknownLinuxGnu | Target::I686UnknownLinuxGnu | Target::I686UnknownLinuxMusl | Target::Mips64UnknownLinuxGnuabi64 | @@ -236,6 +238,7 @@ impl Target { !triple.starts_with("i586") && !triple.starts_with("i686") } + Target::I586UnknownLinuxGnu | Target::I686UnknownLinuxGnu | Target::I686UnknownLinuxMusl | Target::X86_64UnknownLinuxGnu | @@ -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", @@ -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,