[ale] Compiling Go

Ed Cashin ecashin at noserose.net
Fri Dec 18 16:50:24 EST 2015


There was a recent podcast (changelog, perhaps?) where Andrew Gerrand
discussed this aspect of Go 1.5.

The original Go toolchain was written in C by Ken Thompson (yes, the
UNIX-writing peer of Dennis Ritchie) based on the toolchain from plan9.  It
was great to have a C-based toolchain while the Go language was changing.

Now that Go is stabilizing, and to help people contribute to improvements
in the toolchain, it's helpful to move from the very Ken-Thompson-ish C
toolchain to one that's more friendly to general collaboration.  So Rob
Pike wrote a C to Go translator and ran the compiler through it.

That resulted in a working but very ugly (one single package, and not
idiomatic) Go program.  They incrementally made it more Go-like over the
course of a while, and they wound up with the version in Go 1.5.

You can use Go 1.4 and build it from scratch if you have a C compiler.

They mentioned the fact that gcc goes through multiple bootstrap stages to
ensure that it can be built with minimal assumptions about the toolchain
that is used to build gcc.  They don't have something like that in Go, but
you can use Go 1.4.  They'll never create a toolchain that Go 1.4 cannot
build.


On Fri, Dec 18, 2015 at 2:54 PM, Chris Fowler <cfowler at outpostsentinel.com>
wrote:

> I'm playing with accessing my Google Drive from Linux via CLI.  That works
> so now I'm looking at compiling Go from source.
>
> What I don't understand is "You need Go to compile Go"
>
> I guess you do need gcc to compile gcc.  You compile gcc then use it to
> compile itself.
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>


-- 
  Ed Cashin <ecashin at noserose.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20151218/82f11720/attachment.html>


More information about the Ale mailing list