Announcement

Collapse
No announcement yet.

Go 1.5 Is Still Working Towards Being Written In Go

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Go 1.5 Is Still Working Towards Being Written In Go

    Phoronix: Go 1.5 Is Still Working Towards Being Written In Go

    The plan for the upcoming release of Google's Go 1.5 language is to have its tool-chain be written in Go. In order to bootstrap the new Go compiler tool-chain, they'll depend on Go 1.4 to compile the new code...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    So C is written in C and C++ is written in C++, eh? Just kidding.

    Comment


    • #3
      Originally posted by GraysonPeddie View Post
      So C is written in C and C++ is written in C++, eh? Just kidding.
      You have some truth in your joke: Read about the bootstrapping of GCC, when you compile GCC you're compiling it 3 times:
      1. Build GCC with the system compiler.
      2. Build GCC with the compiler from 1.
      3. Build GCC with the compiler from 2.

      Comment


      • #4
        Originally posted by TAXI View Post
        You have some truth in your joke: Read about the bootstrapping of GCC, when you compile GCC you're compiling it 3 times:
        1. Build GCC with the system compiler.
        2. Build GCC with the compiler from 1.
        3. Build GCC with the compiler from 2.
        To clarify the reasoning behind this system:

        1. You build a really simple version of GCC with they system compiler that is just good enough to build the rest of GCC - the idea is to make the requirements of the system compiler as low as possible.

        2. You build the full GCC with the simple version you created in 1. The idea is to get a full-blown GCC now, with all possible features/optimizers built into it. Performance/etc. will not be optimal, however.

        3. Now you build GCC a 3rd time, taking advantage of all the optimizers and so on that are now available. That way the final binary is as good as that GCC release can make it.

        Comment


        • #5
          It'll be fun to read the postmortem of a new port in the future

          "So I first had to port Go 1.1 to build it without Go, then use it to build Go 1.3 to build Go 1.5 with that, which was then used to build the current Go 1.9"

          Mind you, GCC's C++-ization has the same effects. One platform IIRC had to go from the proprietary C compiler to modern GCC via about ten GCC versions starting from early 2.foo.

          Comment


          • #6
            As long as you have a compiler written to C spec (which ever one they used), you should be able to build GCC. I'd imagine the same goes for Go with regards to it's spec. I'm sure you could compile GCC with a compiler from the 90's, if it used the correct C version. If there are any C99-isms in there, it'd be the late 90's, though. lol

            That is to say, if you already have a C compiler (doesn't even have to be GCC) you should be able to compile it. Then it'll compile itself following steps 2, 3, in smitty's post.
            Last edited by Nobu; 10 January 2015, 04:42 PM.

            Comment


            • #7
              No, current gcc requires a C++ compiler, and now current Go requires a Go compiler.

              Comment


              • #8
                Originally posted by curaga View Post
                current Go requires a Go compiler.
                That's what I meant (if you have a Go compiler which can compile Go spec ver x.x, you can compile Go), I guess my wording wasn't really clear, though.
                As far as GCC, then, if you have a valid C compiler you can compile GCC from about a year or two ago no problem.

                Comment

                Working...
                X