-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for arm-unknown-linux-musleabi #48
Conversation
…ch64 architecture
…of the constants in crate nc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can I build for android? I ran cargo build
like usual, but it still created an x86_64 binary:
file ./target/debug/proot-rs
./target/debug/proot-rs: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, with debug_info, not stripped
For building for android, I basically followed the steps here: Unlike other Linux targets, to build for android you need to first download the NDK and unzip it somewhere. And then edit [target.arm-linux-androideabi]
linker = "<path-to-ndk-dir>/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi18-clang" The next steps are the same as for the other targets. rustup target add arm-linux-androideabi Then specify the target we need to build for and start building cargo build --target=arm-linux-androideabi Unfortunately, it is not yet possible to successfully build proot-rs for android (the target But for now we can build to the rustup target add arm-unknown-linux-musleabi
cargo build --target=arm-unknown-linux-musleabi The output will be located at |
The changes included in this PR are intended to add support for the
arm-unknown-linux-musleabi
target to proot-rs.The main changes are:
loader.c
.