Skip to content

Commit

Permalink
Merge pull request #274 from xek/armel
Browse files Browse the repository at this point in the history
Create armel build targets for cross compilation
  • Loading branch information
dswd authored Dec 19, 2021
2 parents 665b4d5 + c61abbd commit 59920ff
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ linker = "arm-linux-gnueabihf-gcc"
objcopy = { path = "arm-linux-gnueabihf-objcopy" }
strip = { path = "arm-linux-gnueabihf-strip" }

[target.armv5te-unknown-linux-gnueabi]
linker = "arm-linux-gnueabi-gcc"
objcopy = { path = "arm-linux-gnueabi-objcopy" }
strip = { path = "arm-linux-gnueabi-strip" }

[target.armv5te-unknown-linux-musleabi]
linker = "arm-linux-gnueabi-gcc"
objcopy = { path = "arm-linux-gnueabi-objcopy" }
strip = { path = "arm-linux-gnueabi-strip" }

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
objcopy = { path = "aarch64-linux-gnu-objcopy" }
Expand Down
3 changes: 3 additions & 0 deletions builder/Dockerfile-deb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ RUN apt-get update \
curl \
gcc-aarch64-linux-gnu \
gcc-arm-linux-gnueabihf \
gcc-arm-linux-gnueabi \
libc6-dev-arm64-cross \
libc6-dev-armhf-cross \
libc6-dev-armel-cross \
libc6-dev-i386 \
gcc-5-multilib \
asciidoctor \
Expand All @@ -22,6 +24,7 @@ ENV RUSTUP_HOME=/opt/rust/rustup \
RUN curl https://sh.rustup.rs -sSf | env CARGO_HOME=/opt/rust/cargo sh -s -- -y --default-toolchain ${TOOLCHAIN} --profile minimal --no-modify-path

RUN env CARGO_HOME=/opt/rust/cargo rustup target add i686-unknown-linux-gnu \
&& env CARGO_HOME=/opt/rust/cargo rustup target add armv5te-unknown-linux-gnueabi \
&& env CARGO_HOME=/opt/rust/cargo rustup target add armv7-unknown-linux-gnueabihf \
&& env CARGO_HOME=/opt/rust/cargo rustup target add aarch64-unknown-linux-gnu

Expand Down
3 changes: 3 additions & 0 deletions builder/Dockerfile-musl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ RUN apt-get update \
curl \
gcc-aarch64-linux-gnu \
gcc-arm-linux-gnueabihf \
gcc-arm-linux-gnueabi \
libc6-dev-arm64-cross \
libc6-dev-armhf-cross \
libc6-dev-armel-cross \
libc6-dev-i386 \
gcc-5-multilib \
asciidoctor \
Expand All @@ -24,6 +26,7 @@ RUN curl https://sh.rustup.rs -sSf | env CARGO_HOME=/opt/rust/cargo sh -s -- -y

RUN env CARGO_HOME=/opt/rust/cargo rustup target add x86_64-unknown-linux-musl \
&& env CARGO_HOME=/opt/rust/cargo rustup target add i686-unknown-linux-musl \
&& env CARGO_HOME=/opt/rust/cargo rustup target add armv5te-unknown-linux-musleabi \
&& env CARGO_HOME=/opt/rust/cargo rustup target add armv7-unknown-linux-musleabihf \
&& env CARGO_HOME=/opt/rust/cargo rustup target add aarch64-unknown-linux-musl

Expand Down
2 changes: 2 additions & 0 deletions builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ build_deb() {

build_deb i386 i686-unknown-linux-gnu
build_deb armhf armv7-unknown-linux-gnueabihf
build_deb armel armv5te-unknown-linux-gnueabi
build_deb arm64 aarch64-unknown-linux-gnu


Expand All @@ -69,6 +70,7 @@ build_static() {

build_static amd64 x86_64-unknown-linux-musl
#build_static i386 i686-unknown-linux-musl
build_static armel armv5te-unknown-linux-musleabi
build_static armhf armv7-unknown-linux-musleabihf
build_static arm64 aarch64-unknown-linux-musl

Expand Down

0 comments on commit 59920ff

Please sign in to comment.