From 84628072b7660615ceaf3e51b688406524802084 Mon Sep 17 00:00:00 2001 From: Diva M Date: Tue, 6 Sep 2022 15:32:59 -0500 Subject: [PATCH] update cross --- Cross.toml | 4 ++-- scripts/cross/aarch64-unknown-linux-gnu.dockerfile | 14 ++++++++++++++ scripts/cross/x86_64-unknown-linux-gnu.dockerfile | 14 ++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 scripts/cross/aarch64-unknown-linux-gnu.dockerfile create mode 100644 scripts/cross/x86_64-unknown-linux-gnu.dockerfile diff --git a/Cross.toml b/Cross.toml index d5f7a5d5068..963e22d0e02 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,5 +1,5 @@ [target.x86_64-unknown-linux-gnu] -pre-build = ["apt-get install -y cmake clang-3.9"] +dockerfile = './scripts/cross/x86_64-unknown-linux-gnu.dockerfile' [target.aarch64-unknown-linux-gnu] -pre-build = ["apt-get install -y cmake clang-3.9"] +dockerfile = './scripts/cross/aarch64-unknown-linux-gnu.dockerfile' diff --git a/scripts/cross/aarch64-unknown-linux-gnu.dockerfile b/scripts/cross/aarch64-unknown-linux-gnu.dockerfile new file mode 100644 index 00000000000..691639cd413 --- /dev/null +++ b/scripts/cross/aarch64-unknown-linux-gnu.dockerfile @@ -0,0 +1,14 @@ +ARG CROSS_BASE_IMAGE +FROM $CROSS_BASE_IMAGE + +RUN apt-get update -y && apt-get upgrade -y + +RUN apt-get install -y unzip && \ + PB_REL="https://github.com/protocolbuffers/protobuf/releases" && \ + curl -L $PB_REL/download/v3.15.8/protoc-3.15.8-linux-aarch_64.zip -o protoc.zip && \ + unzip protoc.zip -d /usr && \ + chmod +x /usr/bin/protoc + +RUN apt-get install -y cmake clang-3.9 + +ENV PROTOC=/usr/bin/protoc diff --git a/scripts/cross/x86_64-unknown-linux-gnu.dockerfile b/scripts/cross/x86_64-unknown-linux-gnu.dockerfile new file mode 100644 index 00000000000..5472b980bad --- /dev/null +++ b/scripts/cross/x86_64-unknown-linux-gnu.dockerfile @@ -0,0 +1,14 @@ +ARG CROSS_BASE_IMAGE +FROM $CROSS_BASE_IMAGE + +RUN apt-get update -y && apt-get upgrade -y + +RUN apt-get install -y unzip && \ + PB_REL="https://github.com/protocolbuffers/protobuf/releases" && \ + curl -L $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip -o protoc.zip && \ + unzip protoc.zip -d /usr && \ + chmod +x /usr/bin/protoc + +RUN apt-get install -y cmake clang-3.9 + +ENV PROTOC=/usr/bin/protoc