Граф коммитов

2852 Коммитов

Автор SHA1 Сообщение Дата
Ian Lance Taylor be1738f1ff libgo: define SO_RCVTIMEO on 32-bit GNU/Linux
Fixes golang/go#42872

Change-Id: I509d615b2447008f0e34811c4632ef56a27ea29c
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273892
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-11-30 20:16:52 +00:00
Ian Lance Taylor 45461eeba1 compiler: improve error messages for expected curly brace
For golang/go#17328

Change-Id: Id0c153e76de2db5d15e768823d67646a4bde0e23
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273890
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-11-30 20:12:43 +00:00
Ian Lance Taylor 213abeedc8 compiler: use correct assignment order for type assertions
For "a, b := v.(T)" we must set a before b.

For golang/go#13433

Change-Id: I68512ad933667b809ca935b204a18e4ad6a92d36
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273906
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-11-30 20:10:15 +00:00
Ian Lance Taylor af683486b4 compiler: always use int context for index values
For golang/go#14844

Change-Id: Idf1eaf2095d404b01fcfa189453e30195834c266
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273889
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-11-30 20:06:40 +00:00
Ian Lance Taylor 68b1c7659a compiler: better error messages for missing interface method
For golang/go#10700

Change-Id: I1d7232f7f5beb0da55515c9d14c6077ee79c8378
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273886
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-11-30 20:02:27 +00:00
Ian Lance Taylor 534fb907c8 compiler: improve error for import of non-string
Change-Id: I97fc28fc21166e024cb5906da894075f8315669b
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273867
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-11-30 19:59:24 +00:00
Ian Lance Taylor 16ab9b001c compiler: avoid follow-on errors for bad types
Mark bad types as erroneous, to avoid generating further errors.

This required some code using array types to check for errors.

For golang/go#19880

Change-Id: I04d287cd66da84c123865fa1aa153ffa47c410ca
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273626
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-11-28 15:00:12 +00:00
Ian Lance Taylor 66669bb6ca compiler: better error for x, x := 1, 2
Was
    assign.go:59:28: error: multiple assignments to x
Now
    assign.go:59:28: error: ‘x’ repeated on left side of :=

Change-Id: I4b69a96950a6077145822ef625fb2117424897f3
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273546
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-11-28 14:55:30 +00:00
Ian Lance Taylor 8cbe18aff9 compiler: avoid silent truncation for string(1 << 32)
In the conversion of a constant integer to a string type, the value of
the constant integer was being silently truncated from unsigned long
to unsigned int, producing the wrong string value.  Add an explicit
overflow check to avoid this problem.

For golang/go#42790

Change-Id: I3407410bb02c24edd114e5f78a1f60ab66378656
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/272611
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-11-25 16:01:50 +00:00
Ian Lance Taylor 78c9a657fd log/syslog: correct asm name for C function
Patch from Rainer Orth.

Change-Id: Ie93e0a4f003fa14e7236fd3d952afb37af3caeaa
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/272259
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-11-23 16:13:35 +00:00
Ian Lance Taylor 36a7b78913 libgo: update to Go 1.15.5 release
Change-Id: Id7f3bbbbdb7c97944579b0ef0f3c254b4346a041
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/272146
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-11-21 01:08:27 +00:00
Ian Lance Taylor b483d0e0a2 compiler, libgo: change mangling scheme
Overhaul the mangling scheme to avoid ambiguities if the package path
contains a dot. Instead of using dot both to separate components and
to mangle characters, use dot only to separate components and use
underscore to mangle characters.

For golang/go#41862

Change-Id: Iddc04422673a4cdc6773d24d3d75fc8945266773
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/271726
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-11-20 20:43:10 +00:00
Ian Lance Taylor c948c2d770 cmd/go, cmd/cgo: update gofrontend mangling checks
This is a port of two patches in the master repository.

https://golang.org/cl/259298

    cmd/cgo: split gofrontend mangling checks into cmd/internal/pkgpath

    This is a step toward porting https://golang.org/cl/219817 from the
    gofrontend repo to the main repo.

    Note that this also corrects the implementation of the v2 mangling
    scheme to use ..u and ..U where appropriate.

https://golang.org/cl/259299

    cmd/go: use cmd/internal/pkgpath for gccgo pkgpath symbol

For golang/go#37272
For golang/go#41862

Change-Id: Id276ca1bac7e1d850408a9d222c19e57b26ba001
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/270637
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-11-18 02:30:50 +00:00
Ian Lance Taylor 893fa057e3 libgo: update to Go 1.15.4 release
Change-Id: I79ce5e20afecf729642d011c4c2afaa56cdf0508
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/268177
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-11-10 15:24:39 +00:00
Nikhil Benesch ae20684902 libgo: handle linking to NetBSD's versioned symbols
On NetBSD, for backwards compatibility, various libc symbols are
renamed to a symbol with a version suffix. For example, this is the
(abbreviated) definition of sigaction:

    int sigaction(...) __asm__ ("__sigaction14")

This poses a challenge for libgo, which attempts to link sigaction by
way of an "//extern" comment:

    //extern sigaction
    func sigaction(...)

This results in a reference to the deprecated compatibility symbol
"sigaction", rather than the desired "__sigaction14" symbol.

This patch introduces a new "//extern-sysinfo" comment to handle this
situation. The new mklinknames.awk script scans a package for these
comments and outputs a "//go:linkname" directive that links the wrapper
to the correct versioned symbol, as determined by parsing the __asm__
annotation on the function's declaration in gen-sysinfo.go.

For now, only the following packages are scanned by mklinknames.awk:

    os
    os/user
    runtime
    syscall

Change-Id: I31b475098aecb9eb0579e8bb5952405e93ac960c
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265125
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
2020-10-29 01:15:12 +00:00
Ian Lance Taylor 88a25df913 syscall: don't build libcall_bsd.go on solaris
This new file was based on master sources that are built for *BSD
but not Solaris

Change-Id: Ie170daa4c572e112fe332cc6505eff974f01ec69
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/266017
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-10-28 19:17:19 +00:00
Ian Lance Taylor be0d2cc2df libgo: update to Go 1.15.3 release
Change-Id: Id414d567a1a57ca9529eb83c64fbfc4f16afafd1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265717
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-10-27 20:57:02 +00:00
Ian Lance Taylor 957591b8a0 compiler, go/internal/gccgoimporter: export notinheap annotation
This is the gofrontend version of https://golang.org/cl/259297.
This is required now because that change is in the 1.15.3 release.

This requires changing the go/internal/gccgoimporter package, to skip
the new annotation. This change will need to be ported to the gc and
x/tools repos.

For golang/go#41761

Change-Id: I81d63db7e7c41d168dfa5f1539c063c1c2413568
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265258
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-10-27 18:03:00 +00:00
Ian Lance Taylor 4c1e7a083b compiler: remove unused Type::in_heap_ member variable
This member variable was added in https://golang.org/cl/46490, but it
was never used. The code uses Named_type::in_heap_ instead.

Change-Id: I155ddbc35270295a2b66f3b82ea84cdf8a324adb
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265257
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-10-27 18:00:03 +00:00
Nikhil Benesch 66657f88f8 syscall: import additional BSD-specific syscall wrappers
Import additional code from upstream for handing system
calls on BSD systems. This makes the syscall package on
NetBSD complete enough to compile the standard library.

Updates golang/go#38538.

Change-Id: I15644dbbd78b1acebcaf45b49403f07c929d97ed
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265123
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Benny Siegert <bsiegert@gmail.com>
2020-10-26 22:03:16 +00:00
Nikhil Benesch 28f3df4686 net/http/cgi: merge upstream changes to default env vars
Incorporate upstream modifications to the cgi package's set of rules
about which environment variables should be inherited by child processes
by default on each platform. In particular this permits tests to pass on
NetBSD by preserving the value of the LD_LIBRARY_PATH environment
variable.

This is a partial backport of the following upstream CLs:

    https://golang.org/cl/263802
    https://golang.org/cl/263577
    https://golang.org/cl/254740

Change-Id: Iedda007372fd4e99fcc231978d663b6ffefb6718
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/264097
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
2020-10-23 23:55:09 +00:00
Nikhil Benesch fa66bd11bb syscall: only compile ptrace varargs shim on Linux
Only compile the __go_ptrace varargs shim on Linux to avoid compilation
failures on some other platforms. The C ptrace function is not entirely
portable (e.g., NetBSD has `int data` instead of `void* data`), and so
far Linux is the only platform that needs the varargs shim.

Additionally, make the types in the ptrace and raw_ptrace function
declarations match. This makes it more clear that the only difference
between the two is that calls via the former are allowed to block while
calls via the latter are not.

Change-Id: Ib589ffd504e12440b726490c0a212d9ba570eb2c
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263517
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Benny Siegert <bsiegert@gmail.com>
2020-10-22 05:27:53 +00:00
Nikhil Benesch 64c25b2365 syscall: import upstream code for BSD sockets and sysctls
Import some missing upstream code for BSD sockets and sysctls and
adapt it for gccgo.

Updates golang/go#38538.

Change-Id: I3b08bf01b499b5be55ef79b4633f47ba266d0148
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261137
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Benny Siegert <bsiegert@gmail.com>
2020-10-21 23:57:02 +00:00
Nikhil Benesch b2be94556b libgo: adjust NetBSD-specific types for stable syscall API
The backwards-compatibility guarantees of the syscall package
require some munging of the C API inferred by mksysinfo.sh.
Specifically, the RTM_RESOLVE constant must be added if it is
missing, and the stat_t struct must use the suffix "timespec"
rather than "tim" for its time-related fields.

Change-Id: I08d9c68e0a299fdf91f14402b63e25377ffa6b59
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263519
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Trust: Benny Siegert <bsiegert@gmail.com>
2020-10-20 20:00:39 +00:00
Nikhil Benesch 6662382a27 syscall: remove Sendfile on NetBSD
NetBSD does not support the sendfile syscall.

Change-Id: I9d8f6145e63011dff1fcd357e1dadd54fe294e85
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263521
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Benny Siegert <bsiegert@gmail.com>
2020-10-20 17:55:33 +00:00
Ian Lance Taylor 3b6252d2d3 compiler: don't export function type parameter names
When hashing a function type the parameter names are ignored.
Therefore, we should not write them into the export data.
Otherwise, minor changes in the order in which we process the
types can cause the export data to change uselessly, leading to
unnecessary rebuilds.

Change-Id: If3c79474f1ace8a31ee468aa0ec36c846f784aba
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/262818
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-10-15 23:25:29 +00:00
Nikhil Benesch 71e161daaf runtime: use correct types in __go_ptrace shim
Make the types of the addr and data arguments in the __go_ptrace shim
match the types declared in Go and the types declared by the C ptrace
function, i.e., void*. This avoids a warning about an implicit
int-to-pointer cast on some platforms.

Change-Id: Icf251b9a756e2dcff2a336ca97e109e7fbeaada7
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/262340
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-10-15 20:35:52 +00:00
Nikhil Benesch d36e74c7a1 libgo: correct Makefile typo in path to x/net/route package
Change-Id: Ic95831c5dfec96da8cd66db61448a163cee8d872
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/262342
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Than McIntosh <thanm@google.com>
2020-10-15 19:37:29 +00:00
Ian Lance Taylor 94808b9af5 compiler: export type for string and bool constants
Also consolidate the identical code for constant type export into a
pair of static methods.

Fixes golang/go#35739

Change-Id: Ifdccd944dbfc032a7bfb29121a5a6e93bcdeb7b7
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/262437
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-10-15 19:33:21 +00:00
Nikhil Benesch b73a8f17df libgo: print reason code if throwing unwind exception fails
Calls to _Unwind_RaiseException and friends *can* return due to bugs in
libgo or memory corruption. When this occurs, print a message to stderr
with the reason code before aborting to aid debugging.

Change-Id: Iadd7bfca40def25fa7fa9208dca52a56dbbe2208
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261257
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-10-14 23:59:01 +00:00
Nikhil Benesch cc1f7d613f libgo: export NetBSD-specific types in mksysinfo.sh
The syscall package depends on many NetBSD-specific types on NetBSD.
Teach mksysinfo.sh to export these types.

This alone is not sufficient to get the syscall package to compile on
NetBSD, but it's a start.

Note that the IfMsgHdr type is recapitalized to IfMsghdr, which requires
changes in the AIX port. The new capitalization is what's used by
upstream in existing NetBSD-specific code and is more consistent with
the capitalization of other C structs with the "hdr" suffix.

Updates golang/go#38538.

Change-Id: I56d8d8d887b293d5a9195114cc7f7b44a5b738cb
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261739
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Trust: Benny Siegert <bsiegert@gmail.com>
Trust: Than McIntosh <thanm@google.com>
2020-10-14 16:49:47 +00:00
Nikhil Benesch c5505c4e62 runtime: correct semaphore implementation on netbsd
NetBSD's semaphores use the underlying lighweight process mechanism
(LWP) on NetBSD, rather than pthreads. This means the m.prodcid needs
to be set to the LWP ID rather than the pthread ID in order for unpark
notifications to get sent to the right place.

Introduce a new getProcID() method that selects the correct ID for the
platform.

Change-Id: I897406e5a9d5bb9025088680ee9f89b9a6c8ff11
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261742
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
Trust: Than McIntosh <thanm@google.com>
Trust: Benny Siegert <bsiegert@gmail.com>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
2020-10-14 07:24:04 +00:00
Nikhil Benesch 6cb7b9e924 runtime: populate signal PC on NetBSD
The NetBSD libc provides an architecture-independent macro that can
extract the PC from a ucontext struct.

Change-Id: I94534ee32d54bae4ead5cafc964bdace058a4322
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261740
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Than McIntosh <thanm@google.com>
2020-10-14 05:21:39 +00:00
Nikhil Benesch 5e76d81ec1 syscall: port fix for netbsd unix sockets from upstream
NetBSD does not include the null terminator when in its reported socket
length. Port the upstream bugfix for the issue (#6627).

This was likely missed during the usual upstream merge because the gc
and gccgo socket implementations have diverged quite a bit.

Change-Id: Id808bae481b5de494cfc641ca9d7f56fef6acd41
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261741
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-10-14 05:18:47 +00:00
Clément Chigot fef8afc187 reflect: ensure uniqueness of type descriptors on AIX.
On AIX, duplication of type descriptors can occur if one is
declared in the libgo and one in the Go program being compiled.
The AIX linker isn't able to merge them together as Linux one does.
One solution is to always load libgo first but that needs a huge mechanism in
gcc core. Thus, this patch ensures that the duplication isn't visible
for the end user.

In reflect and internal/reflectlite, the comparison of rtypes is made on their
name and not only on their addresses.

In reflect, toType() function is using a canonicalization map to force rtypes
having the same rtype.String() to return the same Type. This can't be made in
internal/reflectlite as it needs sync package. But, for now, it doesn't matter
as internal/reflectlite is not widely used.

Fixes golang/go#39276

Change-Id: I56f04f8e7068fbda4ec6b24159c02b7d7fa8b8c5
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/260158
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Than McIntosh <thanm@google.com>
Trust: Cherry Zhang <cherryyz@google.com>
2020-10-14 00:53:17 +00:00
Clément Chigot 2563706e4e libgo/configure: remove -fno-section-anchors for AIX
This option is no longer needed. There is no crash without it since
at least gcc-9.

Change-Id: I1f55cf8cbff3ce00eed2d701f4c599381d0936fa
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/260157
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-10-07 21:08:41 +00:00
Nikhil Benesch 762b74a56f libgo: handle go1.10+ correctly in match.sh
match.sh was not correctly handling build constraints for Go versions
that have a two-digit suffix, like "go1.10".

The same issue will arise with Go 1.100, but that is a long ways off.

Change-Id: I0d41d60aad800d681a12ede68fbe0763289ec268
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/260077
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Than McIntosh <thanm@google.com>
2020-10-07 19:24:52 +00:00
Nikhil Benesch 613e530547 compiler: avoid undefined behavior in Import::read
For some implementations of Stream, advancing the stream will invalidate
the previously-returned peek buffer. Copy the peek buffer before
advancing in Import::read to avoid this undefined behavior.

Change-Id: Icfd56cf5e6f0d94a582d44e63bc51e75c24b8804
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/259438
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Than McIntosh <thanm@google.com>
2020-10-06 20:52:52 +00:00
Nikhil Benesch d00febdab0 gofrontend: correct file reading logic in Stream_from_file
The implementation of Stream_from_file mishandled several cases:

  * It reversed the check for whether bytes were already available in
    the peek buffer.

  * It considered positive return values from lseek to be an error, when
    only a -1 return value indicates an error.

Change-Id: Ic699d3ff7fe589f5ca2362b3db2971a6b9dc9022
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/259437
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Cherry Zhang <cherryyz@google.com>
2020-10-06 00:36:42 +00:00
Ian Lance Taylor 801c458a56 compiler: set varargs correctly for type of method expression
Fixes golang/go#41737

Change-Id: I080886fef85d9e00af3b20d4fd0e38d8cfe74725
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/258977
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-10-01 23:09:07 +00:00
Maciej W. Rozycki c9c084bce7 libgo: add 32-bit RISC-V (RV32) support
Add support for the 32-bit RISC-V (RV32) ISA matching the 64-bit RISC-V
(RV64) port except for async preemption added as a stub only.

Change-Id: I0aacceb7e85243cc0e422d55baf61e1b6185b998
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/251179
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Than McIntosh <thanm@google.com>
2020-10-01 02:46:47 +00:00
Ian Lance Taylor 9e55baf44a net: add hurd build tag
Patch from Svante Signell.

Change-Id: I8b4efdc7a6c92ce74b9544b7fb8d0c72d74f5600
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/257857
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-09-28 23:16:15 +00:00
Clément Chigot 2357468ae9 runtime: remove __go_ptrace on AIX
AIX ptrace syscalls doesn't have the same semantic than the glibc one.
The syscall package is already handling it correctly so disable the new
__go_ptrace C function for AIX.

Change-Id: I5a2abe0dceaf2726ec0f6ad240869a630ab6727b
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/256777
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-09-24 18:30:32 +00:00
Ian Lance Taylor 6a7648c97c libgo: update to Go1.15.2 release
Change-Id: I7c50226413f75b689ff55356a25f78f61320d09a
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/256618
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-09-24 00:31:43 +00:00
Clément Chigot cfee06e20a syscall: fix TestForeground for AIX
Syscall function can't be used on AIX. Therefore, Ioctl in
TestForeground must call raw_ioctl.

Change-Id: I96c3b52ee2d61073ae367028d4dfa926107402ba
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175080
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-09-23 03:07:18 +00:00
Clément Chigot 99ab98d2ed syscall: remove ptrace syscall on ppc64
ptrace is available only for 32 bits programs.

Change-Id: Ie0c81b799f5f2c4aae78cd06a34709460529d94f
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/252558
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-09-23 02:54:46 +00:00
Clément Chigot 5605a0727d runtime, net: fix build errors on AIX
Change-Id: I0aa68454b6c627c4d8b28812957bf5045504f461
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/235158
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-09-23 00:29:14 +00:00
Clément Chigot b24062f0b2 compiler: call runtime.eqtype for non-interface type switch on aix
All type switch clauses must call runtime.eqtype if the linker isn't
able to merge type descriptors pointers. Previously, only interface-type
clauses were doing it.

Updates golang/go#39276

Change-Id: Ic06d95081e837122c409a2aba377d1afae676342
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/255202
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Cherry Zhang <cherryyz@google.com>
2020-09-22 17:23:16 +00:00
Ian Lance Taylor a59167c29d compiler: finalize methods for type aliases of struct types
Previously we would finalize the methods of the alias type itself, but
since its a type alias we really need to finalize the methods of the
aliased type.

Also, handle method expressions of unnamed struct types.

Test case is https://golang.org/cl/251168.

Fixes golang/go#38125

Change-Id: I84c98883ae8641c5fa2b6c5209bf5ef9bb38e57b
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/251279
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-09-21 22:53:00 +00:00
Clément Chigot 6f309797e4 go/internal/gccgoimporter: recognize aixbigafMagic archives
Change-Id: Ice7ec681628ad7ec5ccae45f70e76fc350e9f7e6
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/255201
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Trust: Cherry Zhang <cherryyz@google.com>
2020-09-21 22:41:09 +00:00