Skip to content

Harvey port of golang#2

Open
sevki wants to merge 7 commits into
Harvey-OS:harveyportfrom
sevki:harvey
Open

Harvey port of golang#2
sevki wants to merge 7 commits into
Harvey-OS:harveyportfrom
sevki:harvey

Conversation

@sevki

@sevki sevki commented Jun 18, 2017

Copy link
Copy Markdown
Member

attempting to port go to harvey:

  1. added harvey to src/go/build/syslist.go
  2. added harvey to cmd/dist/build.go

Signed-off-by: Sevki <s@sevki.org>
@sevki sevki force-pushed the harvey branch 5 times, most recently from c7dfb7b to 7fd07e0 Compare June 18, 2017 21:58
Signed-off-by: Sevki <s@sevki.org>
add harvey to okgoos var
add harvey/amd64 to cgoEnabled as false

Signed-off-by: Sevki <s@sevki.org>

@rminnich rminnich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the approach here? Are you going to go with "harvey implies plan 9 with differences" or a full port? What's your plan for keeping up with ToT?

@rminnich rminnich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my port is in plan9port. Why push to master? Why not a branch? Master is supposed to mirror upstream master.

@sevki sevki changed the base branch from master to harveyport June 18, 2017 22:32
@sevki

sevki commented Jun 18, 2017

Copy link
Copy Markdown
Member Author

I'm trying to figure out how would "harvey implies plan9 but with differences" work, and the only way I know how to do that is by trial and error.

For instance, our previous assumption that we can handle this by implementing a ast re-writer didn't really pan out, since there are a lot of asm files, and code that's generated from cmd/dist.

My initial feeling is we'll probably need to fix stuff in runtime by hand and rest can probably be re-written by a tool which I started working on sevki/go2os

@sevki

sevki commented Jun 18, 2017

Copy link
Copy Markdown
Member Author

@rminnich done.

@rminnich

Copy link
Copy Markdown
Contributor

Take a look at how android implies linux. That's what everyone suggested. it's actually what plan9port does in effect and it's why only three files change.

@rminnich rminnich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that it's into this branch it makes sense to do it.

sevki added 4 commits June 20, 2017 22:08
plan9 files are now tagged with !harvey build tags

Signed-off-by: Sevki <s@sevki.org>
for filename matching go uses android = linux type mechanism. This
commit extends that behaviour for harvey to take advantage of that
mechanism.

Signed-off-by: Sevki <s@sevki.org>
this commit gets rid of hardcoding the head type as linux

Signed-off-by: Sevki <s@sevki.org>
this commit adds ron's changes to in the plan9 fork applied to
harvey specific files and adds build tags that prevent plan9
files to be included in the package file lists.

Signed-off-by: Sevki <s@sevki.org>
@gmacd

gmacd commented Nov 18, 2017

Copy link
Copy Markdown
Member

Is this going anywhere? It would be great to get Go running well.

@gmacd

gmacd commented Dec 25, 2017

Copy link
Copy Markdown
Member

I've been looking into the build error you've been seeing in Travis.

I think the problem is caused by the linker thinking that none of the objects are referenced. It seems to think there's no root to the tree. If you use one of the debug modes in the linker, and run with GOOS=plan9, you'll see the first marked object is _rt0_amd64_plan9. Do the same with GOOS=harvey and you'll see nothing.

Try copying the file rt0_plan9_amd64.s, and naming it rt0_harvey_amd64.s. You'll also need to rename the function in the file to _rt0_amd64_harvey.

This worked on my machine :), with a minimal set of changes on top of the plan9port branch.

@sevki

sevki commented Dec 26, 2017

Copy link
Copy Markdown
Member Author

@gmacd it's a Christmas miracle! 🎉

@gmacd

gmacd commented Dec 26, 2017

Copy link
Copy Markdown
Member

Merry Christmas @sevki!

It builds the compiler, but if you then compile anything with it, the exe suicides on exit. It's a step in the right direction though :)

@gmacd

gmacd commented Dec 26, 2017

Copy link
Copy Markdown
Member

Actually, it's not suiciding on exit, it's half way through printing a line. Maybe I'll get more time to look at it in the evening, unless you get there first :)

@sevki

sevki commented Dec 26, 2017

Copy link
Copy Markdown
Member Author

@gmacd best boxing day present ever. I'll have a crack at it 😄

@gmacd

gmacd commented Dec 26, 2017

Copy link
Copy Markdown
Member

Yeah, unfortunately you need to wrap it yourself :)

@sevki

sevki commented Dec 26, 2017

Copy link
Copy Markdown
Member Author

ha. it's the thought that counts mate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants