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

How to compile GO 1.6 or GO1.4 to openwrt? #12

Open
luo12yan opened this issue Apr 10, 2016 · 5 comments
Open

How to compile GO 1.6 or GO1.4 to openwrt? #12

luo12yan opened this issue Apr 10, 2016 · 5 comments

Comments

@luo12yan
Copy link

GO1.6 finally support MIPS processors, but only supports the MIPS64. MIPS processors are not supported. Ask whether there is support GO1.6 plan? Or to support GO1.4?

You can not provide, modify script shows?

@wongsyrone
Copy link

The golang version depends on GCC upstream implementation.

@luo12yan
Copy link
Author

luo12yan commented Apr 10, 2016

Thank you reply。
My English is not good。

In the latest version of the Openwrt , GCC has been upgraded to version 5.3. But no GCCGO and LIBGO compiler options. I want to know how to add it.


妹的。。发现你是中国人。郁闷!用中文再说一次呗。
最新版本的Openwrt。GCC编译器已经更新到了5.3了。我想把GCCGO也加进去。但是不知道要修改哪些部分。

@zoobab
Copy link

zoobab commented Apr 20, 2016

Gccgo documentation says:

https://golang.org/doc/install/gccgo

./configure --enable-languages=c,c++,go

should produce a gccgo. Giving it a shot.

@luo12yan
Copy link
Author

Thank you!@zoobab
Sorry,I didn't say it clearly。
The documents I have long seen。
This is my configuration,but not working。
./configure --target=mipsel-openwrt-linux-gnu --with-gnu-ld --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-multilib --disable-nls --without-isl --without-cloog --with-host-libstdcxx=-lstdc++ --with-float=soft --disable-decimal-float --with-mips-plt --with-diagnostics-color=auto-if-env --enable-libssp --enable-__cxa_atexit --disable-libsanitizer --enable-languages=c,c++,go --enable-shared --enable-threads --enable-lto

My target processor is Mips 32。GO is not the only type of processor supported。

@bettermanbao
Copy link

I have successfully cross compile go program into mips32 bin with below command, you may try this also.

GOARCH=mips32 is for ar71xx, change to GOARCH=mips32le if it is ramips.

cd
git clone https://github.com/gomini/go-mips32.git
cd go-mips32/src
export GOOS=linux
export GOARCH=mips32
sudo mkdir /opt/mipsgo
./make.bash
cd ..
sudo cp -R * /opt/mipsgo
export GOROOT=/opt/mipsgo
export PATH=/opt/mipsgo/bin:$PATH
vi helloworld.go
go build helloworld.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants