Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

library output support for armeabi-v7a ? #123

Closed
ghost opened this issue Jan 22, 2017 · 5 comments
Closed

library output support for armeabi-v7a ? #123

ghost opened this issue Jan 22, 2017 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 22, 2017

Dear tomaka,
When will you add support for armeabi-v7a architecture ?
We need it so much.
Thanks.

@dten
Copy link
Contributor

dten commented Feb 18, 2017

unless I misunderstand you can do this now by specifying build targets in your Cargo.toml

[package.metadata.android]
build_targets = [ "armv7-linux-androideabi" ]

@davll
Copy link

davll commented Sep 13, 2017

It's required to pass -march=armv7-a to arm-linux-androideabi-gcc to generate ARMv7a code instead of ARMv6.

@siriux
Copy link
Contributor

siriux commented Jan 18, 2018

I'm trying to use armv7, and all the options seem to be working (if I add the build target, the -march=armv7-a option is automatically added) but I still get linking errors.

android-rs-glue/examples/basic/target/armv7-linux-androideabi/debug/deps/example-5e3c12e16b8a2e10.example2.rcgu.o: requires unsupported dynamic reloc R_ARM_THM_MOVW_ABS_NC; recompile with -fPIC

On arm-linux-androideabi I managed to fix the linking error using the no-pie option, but on armv7 I cannot get it to work even with:
RUSTFLAGS='-C relocation-model=dynamic-no-pic -C link-args=-no-pie -C link-args=-fPIC' cargo apk run

@talhazengin @dten @davll does armv7 work for you? Is it even supposed to work right now?

Maybe the problem is related to this rust issue: rust-lang/rust#40145

Thanks

@siriux
Copy link
Contributor

siriux commented Jan 19, 2018

I finally got it to work !

The good flags are:
RUSTFLAGS='-C relocation-model=pic -C link-args=-no-pie -C link-args=-Wl,-Bsymbolic'

@mb64
Copy link
Contributor

mb64 commented Jul 30, 2019

It seems this was fixed by #170. But even if it wasn't, #223 fixes it.

@mb64 mb64 closed this as completed Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants