From 078b21db85b26595aa0f4d880b7f6a60a2c75504 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Tue, 31 Dec 2019 15:45:02 +0100 Subject: [PATCH] Fix armv6 build, thanks to @dani-garcia for the review! --- docker/Dockerfile.j2 | 5 +++++ docker/armv6/mysql/Dockerfile | 3 +++ docker/armv6/sqlite/Dockerfile | 3 +++ 3 files changed, 11 insertions(+) diff --git a/docker/Dockerfile.j2 b/docker/Dockerfile.j2 index d2d942d9..f4fa1bc5 100644 --- a/docker/Dockerfile.j2 +++ b/docker/Dockerfile.j2 @@ -182,6 +182,9 @@ RUN rustup target add x86_64-unknown-linux-musl {% elif "aarch64" in target_file %} RUN rustup target add aarch64-unknown-linux-gnu +{% elif "armv6" in target_file %} +RUN rustup target add arm-unknown-linux-gnueabi + {% endif %} # Builds your dependencies and removes the # dummy project, except the target folder @@ -202,6 +205,8 @@ RUN touch src/main.rs RUN cargo build --features ${DB} --release {% elif "aarch64" in target_file %} RUN cargo build --features ${DB} --release --target=aarch64-unknown-linux-gnu +{% elif "armv6" in target_file %} +RUN cargo build --features ${DB} --release --target=arm-unknown-linux-gnueabi {% endif %} ######################## RUNTIME IMAGE ######################## diff --git a/docker/armv6/mysql/Dockerfile b/docker/armv6/mysql/Dockerfile index c6920e36..7bf2791a 100644 --- a/docker/armv6/mysql/Dockerfile +++ b/docker/armv6/mysql/Dockerfile @@ -77,6 +77,8 @@ 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" +RUN rustup target add arm-unknown-linux-gnueabi + # Builds your dependencies and removes the # dummy project, except the target folder # This folder contains the compiled dependencies @@ -92,6 +94,7 @@ RUN touch src/main.rs # Builds again, this time it'll just be # your actual source files being built +RUN cargo build --features ${DB} --release --target=arm-unknown-linux-gnueabi ######################## RUNTIME IMAGE ######################## # Create a new stage with a minimal image diff --git a/docker/armv6/sqlite/Dockerfile b/docker/armv6/sqlite/Dockerfile index 47b81a5c..a9fe22b5 100644 --- a/docker/armv6/sqlite/Dockerfile +++ b/docker/armv6/sqlite/Dockerfile @@ -71,6 +71,8 @@ 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" +RUN rustup target add arm-unknown-linux-gnueabi + # Builds your dependencies and removes the # dummy project, except the target folder # This folder contains the compiled dependencies @@ -86,6 +88,7 @@ RUN touch src/main.rs # Builds again, this time it'll just be # your actual source files being built +RUN cargo build --features ${DB} --release --target=arm-unknown-linux-gnueabi ######################## RUNTIME IMAGE ######################## # Create a new stage with a minimal image