Navigation Menu

Skip to content
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

Closed
tigranbs opened this issue Nov 21, 2016 · 10 comments
Closed

x/mobile: support mips and mips64 #17998

tigranbs opened this issue Nov 21, 2016 · 10 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@tigranbs
Copy link

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

@crawshaw
Copy link
Member

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.

@bradfitz
Copy link
Contributor

/cc @cherrymui @vstefanovic

@cherrymui
Copy link
Member

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.
For the linker, does external linking suffice? Or we need to add internal linking?
Add @minux.

@thanm
Copy link
Contributor

thanm commented Nov 21, 2016

@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.

@quentinmit
Copy link
Contributor

I have a MIPS Android tablet. They definitely exist. I don't know how
prevalent they are. (It's really terrible and I don't actually use it.)

On Nov 21, 2016 10:58 AM, "Than McIntosh" notifications@github.com wrote:

@tigranbs https://github.com/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.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#17998 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAHEMTy8im-tQkTzBFYNHy0OUtwy8ZCNks5rAb-zgaJpZM4K4O3U
.

@petar-jovanovic
Copy link

There are MIPS-Android devices (tablets, settop boxes, wearables).

@tigranbs
Copy link
Author

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 !!
I've done that kind of thing for my companies C++ projects, there is no fixed architectures, all depends on Android NDK support, it's easier to upgrade and manage dependencies.

@thanm
Copy link
Contributor

thanm commented Nov 21, 2016

OK, I stand corrected... I'll have to be a bit more careful about what I read on reddit.

@quentinmit quentinmit changed the title x/mobile: what is the problem with adding mips and mips64 architectures ? x/mobile: support mips and mips64 Nov 22, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 22, 2016
@quentinmit quentinmit added this to the Unreleased milestone Nov 22, 2016
@minux
Copy link
Member

minux commented Dec 8, 2016 via email

@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Jul 20, 2017
@changkun
Copy link
Member

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.

@golang golang locked and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

10 participants