This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gofrontend-dev] Re: GO tools for gccgo cross




On 05/22/2015 05:50 PM, Ian Lance Taylor wrote:
On Fri, May 22, 2015 at 3:11 PM, Andrew Chambers
<andrewchamberss@gmail.com> wrote:
I'm not suggesting breaking go conventions, I just think the default if no
GOARCH is specified then it should match --target.
Sounds good to me.

Perhaps we could check the symlink name for the target triple if no GOARCH
is set.
We should probably build it into the tool, perhaps in zdefaultcc.go
created in gotools/Makefile.am.
I'm not sure exactly what is meant here.

If you build a native gccgo and its corresponding native go tool, I think it should have the plain name 'go' and accept any GOARCH and GOOS values to indicate the cross compile target, and use the correct cross gccgo (via target triple name) based on that. golang determines the cross compiler based on the GOOS and GOARCH settings and I think it should work the same way when using gccgo if possible.

If you build a cross gccgo and want to have a cross go tool dedicated to that cross gccgo then the cross go tool it makes sense to have the target triple name so it is clear it is not the native go tool. (Realize in this case the native gccgo will have to have been built since any go tool, cross or not, has to run natively and have been built using the native gccgo.)

What symlink do you mean? On one system (like a build machine) there could be multiple cross gccgo compilers and therefore multiple cross go tools for those compilers, so then what is the symlink and what would it be set to?

Ian




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]