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

Comments

Projects
None yet
4 participants
@luo12yan
Copy link

luo12yan commented Apr 10, 2016

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

This comment has been minimized.

Copy link

wongsyrone commented Apr 10, 2016

The golang version depends on GCC upstream implementation.

@luo12yan

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Author

luo12yan commented Apr 21, 2016

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

This comment has been minimized.

Copy link

bettermanbao commented Jun 13, 2016

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
You can’t perform that action at this time.