From a3b30ed65ab68f7e9afbe6ba0cbcf92b0946a670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Sun, 5 Jan 2020 22:41:58 +0100 Subject: [PATCH] Add missing target armv7 and cross compile envs --- docker/Dockerfile.j2 | 7 +++++++ docker/armv7/mysql/Dockerfile | 5 +++++ docker/armv7/sqlite/Dockerfile | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/docker/Dockerfile.j2 b/docker/Dockerfile.j2 index f152b9d..6fac763 100644 --- a/docker/Dockerfile.j2 +++ b/docker/Dockerfile.j2 @@ -198,6 +198,11 @@ ENV CC_arm_unknown_linux_gnueabi="/usr/bin/arm-linux-gnueabi-gcc" ENV CROSS_COMPILE="1" ENV OPENSSL_INCLUDE_DIR="/usr/include/arm-linux-gnueabi" ENV OPENSSL_LIB_DIR="/usr/lib/arm-linux-gnueabi" +{% elif "armv7" in target_file %} +ENV CC_armv7_unknown_linux_gnueabihf="/usr/bin/arm-linux-gnueabihf-gcc" +ENV CROSS_COMPILE="1" +ENV OPENSSL_INCLUDE_DIR="/usr/include/arm-linux-gnueabihf" +ENV OPENSSL_LIB_DIR="/usr/lib/arm-linux-gnueabihf" {% endif -%} {% if "alpine" in target_file %} @@ -209,6 +214,8 @@ RUN rustup target add aarch64-unknown-linux-gnu {% elif "armv6" in target_file %} RUN rustup target add arm-unknown-linux-gnueabi +{% elif "armv7" in target_file %} +RUN rustup target add armv7-unknown-linux-gnueabihf {% endif %} # Builds your dependencies and removes the # dummy project, except the target folder diff --git a/docker/armv7/mysql/Dockerfile b/docker/armv7/mysql/Dockerfile index b5cad1d..5528830 100644 --- a/docker/armv7/mysql/Dockerfile +++ b/docker/armv7/mysql/Dockerfile @@ -84,6 +84,11 @@ COPY ./Cargo.* ./ COPY ./rust-toolchain ./rust-toolchain COPY ./build.rs ./build.rs +ENV CC_armv7_unknown_linux_gnueabihf="/usr/bin/arm-linux-gnueabihf-gcc" +ENV CROSS_COMPILE="1" +ENV OPENSSL_INCLUDE_DIR="/usr/include/arm-linux-gnueabihf" +ENV OPENSSL_LIB_DIR="/usr/lib/arm-linux-gnueabihf" +RUN rustup target add armv7-unknown-linux-gnueabihf # Builds your dependencies and removes the # dummy project, except the target folder # This folder contains the compiled dependencies diff --git a/docker/armv7/sqlite/Dockerfile b/docker/armv7/sqlite/Dockerfile index 77c82ef..90ac162 100644 --- a/docker/armv7/sqlite/Dockerfile +++ b/docker/armv7/sqlite/Dockerfile @@ -78,6 +78,11 @@ COPY ./Cargo.* ./ COPY ./rust-toolchain ./rust-toolchain COPY ./build.rs ./build.rs +ENV CC_armv7_unknown_linux_gnueabihf="/usr/bin/arm-linux-gnueabihf-gcc" +ENV CROSS_COMPILE="1" +ENV OPENSSL_INCLUDE_DIR="/usr/include/arm-linux-gnueabihf" +ENV OPENSSL_LIB_DIR="/usr/lib/arm-linux-gnueabihf" +RUN rustup target add armv7-unknown-linux-gnueabihf # Builds your dependencies and removes the # dummy project, except the target folder # This folder contains the compiled dependencies