[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-05-31 Thread ian at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

--- Comment #12 from ian at gcc dot gnu.org  ---
Author: ian
Date: Thu May 31 22:46:52 2018
New Revision: 261045

URL: https://gcc.gnu.org/viewcvs?rev=261045=gcc=rev
Log:
PR go/85429

Various backports from mainline:

libgo: update to Go 1.10.2 release

cmd/go: support more Solaris assembler syntaxes

Patch by Rainer Orth.

cmd/go: update to match recent changes to gc

In https://golang.org/cl/111097 the gc version of cmd/go was updated
to include some gofrontend-specific changes. The gofrontend code
already has different versions of those changes; this CL makes the
gofrontend match the upstream code.

cmd/go, cmd/vet: make vet work with gccgo

Backport https://golang.org/cl/113715 and https://golang.org/cl/113716:

cmd/go: don't pass -compiler flag to vet

Without this running go vet -compiler=gccgo causes vet to fail.
The vet tool does need to know the compiler, but it is passed in
vetConfig.Compiler.

cmd/go, cmd/vet, go/internal/gccgoimport: make vet work with gccgo

When using gccgo/GoLLVM, there is no package file for a standard
library package. Since it is impossible for the go tool to rebuild the
package, and since the package file exists only in the form of a .gox
file, this seems like the best choice. Unfortunately it was confusing
vet, which wanted to see a real file. This caused vet to report errors
about missing package files for standard library packages. The
gccgoimporter knows how to correctly handle this case. Fix this by

1) telling vet which packages are standard;
2) letting vet skip those packages;
3) letting the gccgoimporter handle this case.

As a separate required fix, gccgo/GoLLVM has no runtime/cgo package,
so don't try to depend on it (as it happens, this fixes golang/go#25324).

The result is that the cmd/go vet tests pass when using -compiler=gccgo.

crypto/x509: specify path to AIX certificate file

go/build, cmd/go: update to match recent changes to gc

Several recent changes to the gc version of cmd/go improve the
gofrontend support. These changes are partially copies of existing
gofrontend differences, and partially new code. This CL makes the
gofrontend match the upstream code.

The changes included here come from:
https://golang.org/cl/111575
https://golang.org/cl/111595
https://golang.org/cl/111635
https://golang.org/cl/111636

For the record, the following recent gc changes are based on code
already present in the gofrontend repo:
https://golang.org/cl/110915
https://golang.org/cl/111615

For the record, a gc change, partially based on earlier gofrontend
work, also with new gc code, was already copied to gofrontend repo in
CL 111099:

https://golang.org/cl/111097

This moves the generated list of standard library packages from
cmd/go/internal/load to go/build.

gotools/ChangeLog:

Backport from mainline:
2018-05-09  Ian Lance Taylor  
* Makefile.am (check-go-tool): Don't copy zstdpkglist.go.
* Makefile.in: Rebuild.

Added:
branches/gcc-8-branch/libgo/go/cmd/internal/objabi/funcid.go
branches/gcc-8-branch/libgo/go/go/build/gc.go
branches/gcc-8-branch/libgo/go/go/build/gccgo.go
branches/gcc-8-branch/libgo/go/go/internal/srcimporter/testdata/issue23092/
   
branches/gcc-8-branch/libgo/go/go/internal/srcimporter/testdata/issue23092/issue23092.go
branches/gcc-8-branch/libgo/go/go/internal/srcimporter/testdata/issue24392/
   
branches/gcc-8-branch/libgo/go/go/internal/srcimporter/testdata/issue24392/issue24392.go
branches/gcc-8-branch/libgo/go/net/http/pprof/pprof_test.go
branches/gcc-8-branch/libgo/misc/cgo/testplugin/src/issue24351/
branches/gcc-8-branch/libgo/misc/cgo/testplugin/src/issue24351/main.go
branches/gcc-8-branch/libgo/misc/cgo/testplugin/src/issue24351/plugin.go
Modified:
branches/gcc-8-branch/gotools/ChangeLog
branches/gcc-8-branch/gotools/Makefile.am
branches/gcc-8-branch/gotools/Makefile.in
branches/gcc-8-branch/libgo/MERGE
branches/gcc-8-branch/libgo/Makefile.am
branches/gcc-8-branch/libgo/Makefile.in
branches/gcc-8-branch/libgo/VERSION
branches/gcc-8-branch/libgo/go/archive/zip/reader.go
branches/gcc-8-branch/libgo/go/archive/zip/reader_test.go
branches/gcc-8-branch/libgo/go/cmd/go/alldocs.go
branches/gcc-8-branch/libgo/go/cmd/go/go_test.go
branches/gcc-8-branch/libgo/go/cmd/go/internal/cfg/cfg.go
branches/gcc-8-branch/libgo/go/cmd/go/internal/get/vcs.go
branches/gcc-8-branch/libgo/go/cmd/go/internal/get/vcs_test.go
branches/gcc-8-branch/libgo/go/cmd/go/internal/help/helpdoc.go
branches/gcc-8-branch/libgo/go/cmd/go/internal/load/pkg.go
branches/gcc-8-branch/libgo/go/cmd/go/internal/test/test.go

[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-05-01 Thread ian at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

--- Comment #11 from ian at gcc dot gnu.org  ---
Author: ian
Date: Tue May  1 14:08:44 2018
New Revision: 259797

URL: https://gcc.gnu.org/viewcvs?rev=259797=gcc=rev
Log:
PR go/85429
cmd/go: support more Solaris assembler syntaxes

Patch by Rainer Orth.

Reviewed-on: https://go-review.googlesource.com/110563

Modified:
trunk/gcc/go/gofrontend/MERGE
trunk/libgo/go/cmd/go/internal/work/buildid.go

[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-05-01 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

--- Comment #10 from Rainer Orth  ---
Created attachment 44043
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44043=edit
proposed patch

Here's what I came up with: tested on i386-pc-solaris2.11 and
sparc-sun-solaris2.11,
both with as and gas.  All exclude-related gotools failures are gone.

[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-04-30 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

--- Comment #9 from Ian Lance Taylor  ---
I suppose if worst comes to worst we can try it both ways.

[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-04-30 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

--- Comment #8 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #7 from Ian Lance Taylor  ---
> Do you think you could work out a patch that handles the various different
> cases?

Sure, if I can figure out how to determine whether or not gas is in use.

[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-04-29 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

--- Comment #7 from Ian Lance Taylor  ---
Do you think you could work out a patch that handles the various different
cases?

[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-04-29 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #4 from Ian Lance Taylor  ---
> Should be fixed on tip, requested permission to backport to GCC 8 branch.

It's fixed on sparc, but the Solaris/x86 with as failures remain
(although shifting to a different reason):

# cmd/go/internal/str
Assembler:
"/var/tmp//cc.Q_kMa.s", line 1 : Syntax error
Near line: " .section ".go.buildid",#exclude"

Unlike sparc, there must be no quotes around the section name.

However, that form

 .section .go.buildid,#exclude

makes gas 2.30 choke on x86:

$ gas-2.30 --32 excl.s -o excl.o
excl.s: Assembler messages:
excl.s:1: Error: character following name is not '#'

while it works just fine on sparc.

[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-04-27 Thread ian at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

--- Comment #5 from ian at gcc dot gnu.org  ---
Author: ian
Date: Fri Apr 27 18:44:28 2018
New Revision: 259721

URL: https://gcc.gnu.org/viewcvs?rev=259721=gcc=rev
Log:
PR go/85429
cmd/go: add Solaris assembler syntax for gccgo buildid file

The Solaris assembler uses a different syntax for section directives.

This is https://golang.org/cl/109140 ported over to gccgo.

Reviewed-on: https://go-review.googlesource.com/109141

Modified:
branches/gcc-8-branch/libgo/go/cmd/go/internal/work/buildid.go

[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-04-27 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

Ian Lance Taylor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Ian Lance Taylor  ---
Should be fixed on tip, requested permission to backport to GCC 8 branch.

[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-04-27 Thread ian at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

--- Comment #3 from ian at gcc dot gnu.org  ---
Author: ian
Date: Fri Apr 27 18:01:00 2018
New Revision: 259719

URL: https://gcc.gnu.org/viewcvs?rev=259719=gcc=rev
Log:
PR go/85429
cmd/go: add Solaris assembler syntax for gccgo buildid file

The Solaris assembler uses a different syntax for section directives.

This is https://golang.org/cl/109140 ported over to gccgo.

Reviewed-on: https://go-review.googlesource.com/109141

Modified:
trunk/gcc/go/gofrontend/MERGE
trunk/libgo/go/cmd/go/internal/work/buildid.go

[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-04-18 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #1 from Ian Lance Taylor  ---
> Does the SPARC Solaris assembler support a syntax like
>
> .section ".go.buildid",#exclude
>
> ?  That's what gas seems to support for compatibility.

It does indeed.  I didn't think to look into gas docs because I couldn't
find anything in the Solaris SPARC assembler manual.

> Does that syntax work for x86?

Almost: you need

.section .go.buildid,#exclude

It's weird that they use the sparc synatx in this case instead of the
common "e" flag.

One caveat, though: #exclude wasn't present in the original Solaris 10
assemblers.  However, both the current ones and the Solaris 11
assemblers do support it.  While I'll handle this when adding
SHF_EXCLUDE support with Solaris as to gcc proper, I don't know if I
care enough about those ancient systems...

[Bug go/85429] Several gotools tests FAIL with Solaris as

2018-04-17 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85429

--- Comment #1 from Ian Lance Taylor  ---
Does the SPARC Solaris assembler support a syntax like

.section ".go.buildid",#exclude

?  That's what gas seems to support for compatibility.

Does that syntax work for x86?