Skip to content

Commit

Permalink
Auto merge of #170 - malbarbo:fix-i686-android, r=japaric
Browse files Browse the repository at this point in the history
Use -cpu n270 to run i686-linux-android binaries

After the ndk update used to build libstd rust-lang/rust#45580, i686-linux-android binaries stopped working #143. It's seem that the new toolchain is emitting instructions that the default qemu-i386 cpu does not support. Using -cpu n270 (common in android i686 phones), fix the problem.

Fixes #143.
  • Loading branch information
homunkulus committed Dec 11, 2017
2 parents 94ab2ac + 41e27fe commit 5f04770
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ matrix:
- env: TARGET=aarch64-linux-android CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=arm-linux-androideabi CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=armv7-linux-androideabi CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
# NOTE RUN=1 missing due to issue #143
- env: TARGET=i686-linux-android CPP=1 STD=1 OPENSSL=0.5.5
- env: TARGET=i686-linux-android CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=x86_64-linux-android CPP=1 STD=1 OPENSSL=0.5.5 RUN=1

# OSX
Expand Down
2 changes: 1 addition & 1 deletion docker/i686-linux-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN bash /android-system.sh x86
# 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
ENV CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
CARGO_TARGET_I686_LINUX_ANDROID_RUNNER=qemu-i386 \
CARGO_TARGET_I686_LINUX_ANDROID_RUNNER="qemu-i386 -cpu n270" \
CC_i686_linux_android=i686-linux-android-gcc \
CXX_i686_linux_android=i686-linux-android-g++ \
DEP_Z_ROOT=/android-ndk/sysroot/usr/ \
Expand Down

0 comments on commit 5f04770

Please sign in to comment.