-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the `thumbv7neon-linux-androideabi`, `thumbv7neon-unknown-linux-gnueabihf`, and `thumbv7neon-unknown-linux-musleabihf` targets. Closes #254.
- Loading branch information
1 parent
87a322e
commit 03f943a
Showing
6 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
FROM ubuntu:20.04 | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
COPY common.sh lib.sh / | ||
RUN /common.sh | ||
|
||
COPY cmake.sh / | ||
RUN /cmake.sh | ||
|
||
COPY xargo.sh / | ||
RUN /xargo.sh | ||
|
||
COPY android-ndk.sh / | ||
RUN /android-ndk.sh arm 28 | ||
ENV PATH=$PATH:/android-ndk/bin | ||
|
||
COPY android-system.sh / | ||
RUN /android-system.sh arm | ||
|
||
COPY qemu.sh / | ||
RUN /qemu.sh arm | ||
|
||
RUN cp /android-ndk/sysroot/usr/lib/arm-linux-androideabi/28/libz.so /system/lib/ | ||
|
||
COPY android-runner / | ||
|
||
# Libz is distributed in the android ndk, but for some unknown reason it is not | ||
# found in the build process of some crates, so we explicit set the DEP_Z_ROOT | ||
# likewise, the toolchains expect the prefix `thumbv7neon-linux-androideabi`, | ||
# which we don't have, so just export every possible variable, such as AR. | ||
# Also export all target binutils just in case required. | ||
ENV CARGO_TARGET_THUMBV7NEON_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \ | ||
CARGO_TARGET_THUMBV7NEON_LINUX_ANDROIDEABI_RUNNER="/android-runner arm" \ | ||
AR_thumbv7neon_linux_androideabi=arm-linux-androideabi-ar \ | ||
AS_thumbv7neon_linux_androideabi=arm-linux-androideabi-as \ | ||
CC_thumbv7neon_linux_androideabi=arm-linux-androideabi-gcc \ | ||
CXX_thumbv7neon_linux_androideabi=arm-linux-androideabi-g++ \ | ||
LD_thumbv7neon_linux_androideabi=arm-linux-androideabi-ld \ | ||
NM_thumbv7neon_linux_androideabi=arm-linux-androideabi-nm \ | ||
OBJCOPY_thumbv7neon_linux_androideabi=arm-linux-androideabi-objcopy \ | ||
OBJDUMP_thumbv7neon_linux_androideabi=arm-linux-androideabi-objdump \ | ||
RANLIB_thumbv7neon_linux_androideabi=arm-linux-androideabi-ranlib \ | ||
READELF_thumbv7neon_linux_androideabi=arm-linux-androideabi-readelf \ | ||
SIZE_thumbv7neon_linux_androideabi=arm-linux-androideabi-size \ | ||
STRINGS_thumbv7neon_linux_androideabi=arm-linux-androideabi-strings \ | ||
STRIP_thumbv7neon_linux_androideabi=arm-linux-androideabi-strip \ | ||
BINDGEN_EXTRA_CLANG_ARGS_thumbv7neon_linux_androideabi="--sysroot=/android-ndk/sysroot" \ | ||
DEP_Z_INCLUDE=/android-ndk/sysroot/usr/include/ \ | ||
RUST_TEST_THREADS=1 \ | ||
HOME=/tmp/ \ | ||
TMPDIR=/tmp/ \ | ||
ANDROID_DATA=/ \ | ||
ANDROID_DNS_MODE=local \ | ||
ANDROID_ROOT=/system | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM ubuntu:16.04 | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
COPY common.sh lib.sh / | ||
RUN /common.sh | ||
|
||
COPY cmake.sh / | ||
RUN /cmake.sh | ||
|
||
COPY xargo.sh / | ||
RUN /xargo.sh | ||
|
||
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \ | ||
g++-arm-linux-gnueabihf \ | ||
libc6-dev-armhf-cross | ||
|
||
COPY qemu.sh / | ||
RUN /qemu.sh arm softmmu | ||
|
||
COPY dropbear.sh / | ||
RUN /dropbear.sh | ||
|
||
COPY linux-image.sh / | ||
RUN /linux-image.sh armv7 | ||
|
||
COPY linux-runner / | ||
|
||
# Export all target binutils just in case required. | ||
ENV CARGO_TARGET_THUMBV7NEON_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \ | ||
CARGO_TARGET_THUMBV7NEON_UNKNOWN_LINUX_GNUEABIHF_RUNNER="/linux-runner armv7" \ | ||
AR_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-ar \ | ||
AS_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-as \ | ||
CC_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc \ | ||
CXX_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++ \ | ||
LD_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-ld \ | ||
NM_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-nm \ | ||
OBJCOPY_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-objcopy \ | ||
OBJDUMP_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-objdump \ | ||
RANLIB_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-ranlib \ | ||
READELF_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-readelf \ | ||
SIZE_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-size \ | ||
STRINGS_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-strings \ | ||
STRIP_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-strip \ | ||
BINDGEN_EXTRA_CLANG_ARGS_thumbv7neon_unknown_linux_gnueabihf="--sysroot=/usr/arm-linux-gnueabihf" \ | ||
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf \ | ||
RUST_TEST_THREADS=1 \ | ||
PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabihf/pkgconfig/:${PKG_CONFIG_PATH}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM ubuntu:20.04 | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
COPY common.sh lib.sh / | ||
RUN /common.sh | ||
|
||
COPY cmake.sh / | ||
RUN /cmake.sh | ||
|
||
COPY xargo.sh / | ||
RUN /xargo.sh | ||
|
||
COPY qemu.sh / | ||
RUN /qemu.sh arm | ||
|
||
COPY musl.sh / | ||
RUN /musl.sh \ | ||
TARGET=arm-linux-musleabihf \ | ||
"COMMON_CONFIG += --with-arch=armv7-a \ | ||
--with-float=hard \ | ||
--with-mode=thumb \ | ||
--with-fpu=vfp" | ||
|
||
# Allows qemu run dynamic linked binaries | ||
RUN ln -sf \ | ||
/usr/local/arm-linux-musleabihf/lib/libc.so \ | ||
/usr/local/arm-linux-musleabihf/lib/ld-musl-armhf.so.1 | ||
|
||
# Export all target binutils just in case required. | ||
ENV CARGO_TARGET_THUMBV7NEON_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-musleabihf-gcc \ | ||
CARGO_TARGET_THUMBV7NEON_UNKNOWN_LINUX_MUSLEABIHF_RUNNER=qemu-arm \ | ||
AR_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-ar \ | ||
AS_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-as \ | ||
CC_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-gcc \ | ||
CXX_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-g++ \ | ||
LD_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-ld \ | ||
NM_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-nm \ | ||
OBJCOPY_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-objcopy \ | ||
OBJDUMP_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-objdump \ | ||
RANLIB_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-ranlib \ | ||
READELF_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-readelf \ | ||
SIZE_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-size \ | ||
STRINGS_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-strings \ | ||
STRIP_thumbv7neon_unknown_linux_musleabihf=arm-linux-musleabihf-strip \ | ||
BINDGEN_EXTRA_CLANG_ARGS_thumbv7neon_unknown_linux_musleabihf="--sysroot=/usr/local/arm-linux-musleabihf" \ | ||
QEMU_LD_PREFIX=/usr/local/arm-linux-musleabihf \ | ||
RUST_TEST_THREADS=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters