Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gccgo: audit gccgo syscall package against gc syscall package #1790

Closed
bradfitz opened this issue May 8, 2011 · 17 comments
Closed

gccgo: audit gccgo syscall package against gc syscall package #1790

bradfitz opened this issue May 8, 2011 · 17 comments

Comments

@bradfitz
Copy link
Contributor

bradfitz commented May 8, 2011

Apparently the gcc syscall package is out of sync with that gc syscall package, the
latter of which includes more system calls.

In particular: getrusage, but probably a bunch more.
@bradfitz
Copy link
Contributor Author

Comment 1:

Labels changed: added gccgo.

Owner changed to @ianlancetaylor.

@rsc
Copy link
Contributor

rsc commented Dec 9, 2011

Comment 3:

Labels changed: added priority-later, removed priority-medium.

@rsc
Copy link
Contributor

rsc commented Dec 12, 2011

Comment 4:

Labels changed: added priority-go1.

@robpike
Copy link
Contributor

robpike commented Jan 13, 2012

Comment 5:

Owner changed to builder@golang.org.

@rsc
Copy link
Contributor

rsc commented Jan 24, 2012

Comment 7:

Maybe Brad's new tool can help.

@remyoudompheng
Copy link
Contributor

Comment 8:

I'd say we could use it once:
- gccgo __asm__("") syntax is removed by Ian
- architecture-specific files it has for solaris/rtems/irix are properly tagged by
+build tags

@ianlancetaylor
Copy link
Contributor

Comment 9:

__asm__ syntax is now replaced.

@alberts
Copy link
Contributor

alberts commented Mar 7, 2012

Comment 10:

syscall.Mount needs a minor fix:
error: argument 4 has incompatible type (cannot use type uintptr as type int)

@bradfitz
Copy link
Contributor Author

bradfitz commented Mar 9, 2012

Comment 11:

Ian send me the generated 32- and 64-bit sysinfo.go and libcalls.go from the gccgo
build, I put them into place renamed, added +build irix to socket_irix.go, and hacked up
cmd/api a bit.
Resulting diff for linux-amd64 attached.

Attachments:

  1. gc-gccgo-diff.txt (67873 bytes)

@bradfitz
Copy link
Contributor Author

bradfitz commented Mar 9, 2012

Comment 12:

If others want to run this,
Hacked up cmd/api is http://golang.org/cl/5776044
Generated files from Ian (and renamed) that you have to add to gccgo/libgo/go/syscall
are attached.
Then I run:
$ pwd
/home/bradfitz/hack/gccgo/libgo/go/syscall
$ go tool api --dirs . | grep "^pkg syscall" > gccgo.txt

Attachments:

  1. extra-libgo-go-syscall.tar.gz (110495 bytes)

@bradfitz
Copy link
Contributor Author

bradfitz commented Mar 9, 2012

Comment 13:

Heh,
-pkg syscall, type RtMsg struct, Protocol uint8
+pkg syscall, type RtMsg struct, Procotol uint8

@alberts
Copy link
Contributor

alberts commented Mar 9, 2012

Comment 14:

I tried to compile most of the 6g tree with gccgo. It picked up the following, some of
which are in the diff:
exp/inotify turns up quite a few missing syscall bits.
src/pkg/os/stat_linux.go:22:29: error: reference to undefined field or method ‘Mtim’
src/pkg/os/stat_linux.go:60:50: error: reference to undefined field or method ‘Atim’
and something quite strange:
reflect/type.go:947:66: error: incompatible types in binary expression
reflect/type.go:1009:69: error: incompatible types in binary expression
Also, gccgo can't compile the builtin package. Maybe that's intentional.

@ianlancetaylor
Copy link
Contributor

Comment 15:

6g can't compile the builtin package either.

@ianlancetaylor
Copy link
Contributor

Comment 16:

This was not fully fixed for the gcc 4.7.0 release.  The full fix will have to be in
4.7.1.

Labels changed: added priority-later, removed priority-go1.

Owner changed to @ianlancetaylor.

@alberts
Copy link
Contributor

alberts commented Mar 31, 2012

Comment 17:

I see there's been some activity:
http://code.google.com/p/gofrontend/source/detail?r=5016046ebbfea59cc34d1f7b3518440032f596aa
It would be nice to get syscall.Mount fixed.

@ianlancetaylor
Copy link
Contributor

Comment 18:

On mainline I've gotten the changes down to the attached.  At this point I'm inclined to
close this bug report, unless anybody sees any specific items that need to be addressed.

Attachments:

  1. foo.3 (69978 bytes)

@ianlancetaylor
Copy link
Contributor

Comment 19:

No comments, so closing as fixed.  If you find any specific problem please open a new
issue for that problem.  Thanks.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants