Hi Geert-Johan,

On Tue, Jan 07, 2014 at 11:13:50AM +0100, Geert-Johan Riemer wrote:
> I'm working on adding Go (http://golang.org) to OpenWRT. Actually, I already
> have it working.

Great!
 
> The goals:
>  - Create gcc crosscompiler with the gccgo frontend which can be used to
> compile a go project into a binary.
>  - Build and include libgo.so in the target image. libgo.so is the only
> run-time requirement for binaries built with gccgo. ("go packages" that
> are included in the project are compiled into the binary, afaik there's no
> need for a packages feed providing go libs)
> 
> To achieve these I've added some directives in the OpenWRT makefiles an
> menu config.
> https://github.com/GeertJohan/openwrt-go/commit/ac3ad0dc738ed94bed82723b486566b23ea491d1
> 
> This all works fine, and I have go binaries running on the MikroTIK 750GL.
> However, I would like to add/fix a two problems before I create and submit a
> patch.
> 
> GCC version
> The gccgo frontend is only available in gcc 4.7.x (or higher). What would
> be the proper way to force the user to use gcc 4.7.x (or higher) when
> building with gccgo?
> Can the "Build/install gccgo compiler?" option be greyed out until the
> proper version of gcc is selected?

Not sure if this will work but please try:

DEPENDS:=@GCC_VERSION_4_8

I've picked that one from toolchain/gcc/Config.version.

> libgo.so depends on eglibc
> I have the same "dependency" problem with libgo.so, it requires eglibc. The
> default is uclibc. What would be the proper way to notify the user?

Try adding @USE_EGLIBC in DEPENDS variable.

> I don't want people having to figure out why their build fails when it can
> be avoided.
> 
> Any thoughts on how to do this?
> Do you see anything else that might need attention before submitting a
> patch?

Please send your patch so we can test it and comment...

Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to