-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/mobile: support mips and mips64 #17998
Comments
It requires adding -buildmode=c-shared support to cmd/go, cmd/compile, and cmd/link for GOOS=mips and GOOS=mips64. In particular the compiler has to generate position-independent code with the -shared flag. I don't know how much work is involved. |
For position-independent code, I don't think it's very hard, but do need some work for accessing globals. There is no native PC-relative addressing on MIPS, so we may need to do something like PPC64. |
@tigranbs do you have an actual Android MIPS device that you are interested in? From what I have been told, there are virtually no MIPS Android devices out in the wild right now. |
I have a MIPS Android tablet. They definitely exist. I don't know how On Nov 21, 2016 10:58 AM, "Than McIntosh" notifications@github.com wrote:
|
There are MIPS-Android devices (tablets, settop boxes, wearables). |
Well actually support for Mips kind of devices is just for convince management that Golang is useful for cross platform mobile libraries. And in fact I think it's not hard to implement ... I'm thinking of trying to compile simple project with plain Go compiler and Android CXX Mips compiler, then based on results I'll try to integrate it with existing Gomobile functionality. I saw that in code there is fixed values for architectures, just curios, why not to get architectures from Android NDK dynamically and just build project based on flags and NDK compilers for that architecture ? I'll definitely will try to do this !! |
OK, I stand corrected... I'll have to be a bit more careful about what I read on reddit. |
If we generate correct GOT entries and relocations for all global accesses,
then we can rely on external linking to produce c-shared DSOs.
|
Historically the NDK supported 32-bit and 64-bit MIPS, but support for these ABIs was removed in NDK r17. It is a bit sad but I think we could not do anything here. Close. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7.3 darwin/amd64
What operating system and processor architecture are you using (
go env
)?amd64/darwin
Gomobile is awesome, and I'm done small HTTP library for our mobile applications on iOS and Android.
But the thing is that our management is afraid that my libs wouldn't work on all android devices with Android 4.0+ OS. Because Gomobile is not supporting
mips and mips64
architectures.I've done a lot of C++ stuff for Android and know how compilers work and how compile project on all that architectures.
That's why I just wanted to know what should I do to add support for that architectures as well ? and of-course send a pull request for that.
Thanks
The text was updated successfully, but these errors were encountered: