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

Open
tigranbs opened this Issue Nov 21, 2016 · 9 comments

Comments

Projects
None yet
9 participants
@tigranbs

tigranbs commented Nov 21, 2016

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

This comment has been minimized.

Contributor

crawshaw commented Nov 21, 2016

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

This comment has been minimized.

Member

bradfitz commented Nov 21, 2016

@cherrymui

This comment has been minimized.

Contributor

cherrymui commented Nov 21, 2016

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

This comment has been minimized.

Member

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

This comment has been minimized.

Contributor

quentinmit commented Nov 21, 2016

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

This comment has been minimized.

petar-jovanovic commented Nov 21, 2016

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

@tigranbs

This comment has been minimized.

tigranbs commented Nov 21, 2016

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

This comment has been minimized.

Member

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 from x/mobile: what is the problem with adding mips and mips64 architectures ? to x/mobile: support mips and mips64 Nov 22, 2016

@quentinmit quentinmit added the NeedsFix label Nov 22, 2016

@quentinmit quentinmit added this to the Unreleased milestone Nov 22, 2016

@minux

This comment has been minimized.

Member

minux commented Dec 8, 2016

@gopherbot gopherbot added the mobile label Jul 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment