Anthony Martin | 1 Dec 2011 18:48

Building Go on Plan 9

A few people were asking about this so I
wrote up a tutorial.  I also uploaded a
copy to http://apm.sdf.org/go/NOTES for
anyone who has trouble with attachments.

Cheers,
  Anthony
# Building Go on Plan 9
# Anthony Martin
# ality <at> pbrane.org

# This document will guide you through the process
# of compiling the commands and packages in the Go
# source code distribution.
#
# Before we get started you should make sure you
# have GNU Make installed.  The version on contrib
# is 3.81 and is just fine for our purposes.
#
# It's also necessary to have Mercurial installed
# and I believe there is a version on contrib as
# well.
#
# After reading this document you can extract the
# commands and pipe them to the shell using:
#
#     sed -n 's,^[% ] ,,p' NOTES | rc
#
(Continue reading)

John Floren | 1 Dec 2011 19:00
Favicon

Re: Building Go on Plan 9

On Thu, Dec 1, 2011 at 9:48 AM, Anthony Martin <ality <at> pbrane.org> wrote:
> A few people were asking about this so I
> wrote up a tutorial.  I also uploaded a
> copy to http://apm.sdf.org/go/NOTES for
> anyone who has trouble with attachments.
>
> Cheers,
>  Anthony
>

How many different Go porting efforts do we now have for Plan 9?
There's apparently yours, Ron's, Lucio's, and I think the 9front guys
have/had something cooking too.

Which ones can actually be updated with "hg pull"?

John

Stanley Lieber | 1 Dec 2011 19:05
Picon

Re: Building Go on Plan 9

On Thu, Dec 1, 2011 at 12:00 PM, John Floren <john <at> jfloren.net> wrote:
> On Thu, Dec 1, 2011 at 9:48 AM, Anthony Martin <ality <at> pbrane.org> wrote:
>> A few people were asking about this so I
>> wrote up a tutorial.  I also uploaded a
>> copy to http://apm.sdf.org/go/NOTES for
>> anyone who has trouble with attachments.
>>
>> Cheers,
>>  Anthony
>>
>
> How many different Go porting efforts do we now have for Plan 9?
> There's apparently yours, Ron's, Lucio's, and I think the 9front guys
> have/had something cooking too.
>
> Which ones can actually be updated with "hg pull"?

Taruti has said the 9front port is dead, pending developments with the
other ports.

-sl

erik quanstrom | 1 Dec 2011 18:51
Favicon

Re: Building Go on Plan 9

please just post again inline because 9fans.net doesn't archive attachments.

- erik

Anthony Martin | 1 Dec 2011 19:14

Re: Building Go on Plan 9

John Floren <john <at> jfloren.net> once said:
> How many different Go porting efforts do we now
> have for Plan 9?  There's apparently yours, Ron's,
> Lucio's, and I think the 9front guys have/had
> something cooking too.

That's it as far as I know.

> Which ones can actually be updated with "hg pull"?

None yet.

I have CLs at the ready for every change
I've made and I'm committed to getting
them upstream.

Not to be presumptuous but I really think
the way I've done it is the best way forward.
All you need is GNU Make, Mercurial, a few 
modified library headers and the bundle of
changes that I put in 9fix.patch.

I'd like to get the library headers in Nix
and hopefully even Plan 9 proper.  Then
there's only a handful of changes that I
need to get into the Go distribution.

It will happen. :-)

Cheers,
(Continue reading)

Anthony Martin | 1 Dec 2011 19:18

Re: Building Go on Plan 9

erik quanstrom <quanstro <at> quanstro.net> once said:
> please just post again inline because 9fans.net
> doesn't archive attachments.

Sure thing.

---
A few people were asking about this so I
wrote up a tutorial.  I also uploaded a
copy to http://apm.sdf.org/go/NOTES for
anyone who has trouble with attachments.

Cheers,
  Anthony

# Building Go on Plan 9
# Anthony Martin
# ality <at> pbrane.org

# This document will guide you through the process
# of compiling the commands and packages in the Go
# source code distribution.
#
# Before we get started you should make sure you
# have GNU Make installed.  The version on contrib
# is 3.81 and is just fine for our purposes.
#
# It's also necessary to have Mercurial installed
# and I believe there is a version on contrib as
# well.
(Continue reading)

Charles Forsyth | 1 Dec 2011 19:19
Picon

Re: Building Go on Plan 9

modified library headers?

On 1 December 2011 18:14, Anthony Martin <ality <at> pbrane.org> wrote:
> a few
> modified library headers

Anthony Martin | 1 Dec 2011 19:28

Re: Building Go on Plan 9

Charles Forsyth <charles.forsyth <at> gmail.com> once said:
> modified library headers?

% ls (386 sys)^/include/go
386/include/go/u.h
386/include/go/ureg_amd64.h
386/include/go/ureg_arm.h
386/include/go/ureg_x86.h
sys/include/go/ar.h
sys/include/go/bio.h
sys/include/go/bootexec.h
sys/include/go/goenv.h
sys/include/go/libc.h
sys/include/go/mach.h
sys/include/go/stdio.h

Some of these are just copies of the standard
headers and others have a few adjustments that
the Go toolchain requires.  All except mach.h
have #pragmas that point to the stock location
in /386/lib/*.a.

  Anthony

erik quanstrom | 1 Dec 2011 19:30
Favicon

Re: Building Go on Plan 9

> 386/include/go/ureg_arm.h
> 386/include/go/ureg_x86.h

surely that's the wrong place.

- erik

Anthony Martin | 1 Dec 2011 19:45

Re: Building Go on Plan 9

erik quanstrom <quanstro <at> quanstro.net> once said:
> > 386/include/go/ureg_arm.h
> > 386/include/go/ureg_x86.h
> 
> surely that's the wrong place.

You would think so but that's how
where the headers are expected to
be for Go's libmach.

% gg 'include.*ureg'
src/cmd/cov/main.c:14: #include <ureg_x86.h>
src/cmd/prof/main.c:12: 	#include <ureg_amd64.h>
src/cmd/prof/main.c:15: 	#include <ureg_x86.h>
src/libmach/5.c:35: #include "ureg_arm.h"
src/libmach/5db.c:32: #include "ureg_arm.h"
src/libmach/6.c:35: #include "ureg_amd64.h"
src/libmach/8.c:34: #include <ureg_x86.h>
src/libmach/8db.c:34: #include <ureg_amd64.h>
src/libmach/8db.c:37: #include <ureg_x86.h>
src/libmach/darwin.c:33: #include <ureg_x86.h>
src/libmach/darwin.c:36: #include <ureg_amd64.h>
src/libmach/linux.c:42: #include <ureg_x86.h>
src/libmach/linux.c:45: #include <ureg_amd64.h>

Cheers,
  Anthony


Gmane