Description
I'm currently porting x/net for aix/ppc64
for GC implementation (https://go-review.googlesource.com/c/net/+/170557). I was aiming to port it for Gccgo implementation as well.
In my understanding, for most of the OSes, a package implementation doesn't need to be changed according to which compiler is being used.
The only case, I'm thinking of, where a special file is needed is for Oses (like AIX, Solaris and maybe 1.12 Darwin) which haven't the same syscall backend. On Linux or BSDs, syscall.Syscall
can be called from both Gc and Gccgo. Correct me if I'm wrong.
But on AIX, Gc syscalls needed //go:linkname
and Gccgo ones needed //extern
. Therefore a different syscall file is needed. However, the rest of the package should remain unchanged right ?
Note I've checked with gccgo-8 (go1.10) on Linux/amd64 and x/net package tests seems to pass as is.
@ianlancetaylor could you please confirm than these are the only different between Gccgo and Gc compiler on a package implementation ?
CC @mikioh