Commit Graph

172 Commits

Author SHA1 Message Date
Ian Lance Taylor 69921f4a7e libgo: update to final Go 1.18 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/393377
2022-03-16 13:52:32 -07:00
Ian Lance Taylor 3343e7e2c4 libgo: update Hurd support
Patches from Svante Signell for PR go/104290.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/386797
2022-02-18 15:33:32 -08:00
Ian Lance Taylor 20a33efdf3 libgo: update to Go1.18rc1 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/386594
2022-02-18 13:12:08 -08:00
Ian Lance Taylor 24ca97325c libgo: restore building on Solaris
Add build tags and a few other changes so that libgo builds on Solaris.

Patch partially from Rainer Orth.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/386215
2022-02-16 12:20:10 -08:00
Ian Lance Taylor 8dc2499aa6 libgo: update to Go1.18beta2
gotools/
	* Makefile.am (go_cmd_cgo_files): Add ast_go118.go
	(check-go-tool): Copy golang.org/x/tools directories.
	* Makefile.in: Regenerate.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384695
2022-02-11 15:01:19 -08:00
Ian Lance Taylor 829931ec93 libgo: various fixes for Solaris support
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/342189
2021-08-14 17:34:52 -07:00
Ian Lance Taylor c5b21c3f4c libgo: update to Go1.17rc2
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/341629
2021-08-12 20:23:07 -07:00
Ian Lance Taylor 726b7aa004 libgo: update to Go1.16rc1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/287493
2021-01-29 11:04:55 -08:00
Paul E. Murphy cfaaa6a1ca syscall: ensure openat uses variadic libc wrapper
On powerpc64le, this caused a failure in TestUnshareUidGidMapping
due to stack corruption which resulted in a bogus execve syscall.

Use the existing c wrapper to ensure we respect the ppc abi for
variadic functions.

Fixes PR go/98610

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/282717
2021-01-12 13:21:09 -08:00
Ian Lance Taylor f47c00cf95 syscall: don't define sys_SETREUID and friends
We don't use them, since we always call the C library functions which do
the right thing anyhow.  And they aren't defined on all GNU/Linux variants.

Fixes PR go/98510

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/281473
2021-01-05 13:53:13 -08:00
Ian Lance Taylor cfcbb4227f libgo: update to Go1.16beta1 release
This does not yet include support for the //go:embed directive added
in this release.

	* Makefile.am (check-runtime): Don't create check-runtime-dir.
	(mostlyclean-local): Don't remove check-runtime-dir.
	(check-go-tool, check-vet): Copy in go.mod and modules.txt.
	(check-cgo-test, check-carchive-test): Add go.mod file.
	* Makefile.in: Regenerate.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/280172
2020-12-30 15:13:24 -08:00
Ian Lance Taylor 9121f80841 syscall: don't use AF_LINK on hurd
Patch from Svante Signell.

Fixes PR go/98153

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/275939
2020-12-07 17:08:48 -08:00
Ian Lance Taylor cf392dbdf1 libgo: update to Go 1.15.4 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/268177
2020-11-10 07:25:32 -08:00
Nikhil Benesch 0cdde1e7ae 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

gotools/:
	* Makefile.am (check-runtime): Add runtime_linknames.go to
	--extrafiles.
	* Makefile.in: Regenerate.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265125
2020-10-28 18:20:50 -07:00
Ian Lance Taylor dfbadb8ce9 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

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/266017
2020-10-28 12:18:01 -07:00
Nikhil Benesch a573530d50 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.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265123
2020-10-26 15:04:16 -07:00
Nikhil Benesch 439407aa2c 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.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263517
2020-10-21 22:29:04 -07:00
Nikhil Benesch 2ab1fc7a32 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.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261137
2020-10-21 16:57:59 -07:00
Nikhil Benesch 522307281c syscall: remove Sendfile on NetBSD
NetBSD does not support the sendfile syscall.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263521
2020-10-20 10:57:10 -07:00
Nikhil Benesch 7355c1df55 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.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261741
2020-10-13 22:19:35 -07:00
Maciej W. Rozycki 2c5499b57c 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.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/251179
2020-09-30 19:47:48 -07:00
Clément Chigot e884ced052 syscall: fix TestForeground for AIX
Syscall function can't be used on AIX. Therefore, Ioctl in
TestForeground must call raw_ioctl.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175080
2020-09-22 20:07:34 -07:00
Clément Chigot 1260f69aeb syscall: remove ptrace syscall on ppc64
ptrace is available only for 32 bits programs.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/252558
2020-09-22 19:55:34 -07:00
Paul E. Murphy c560591408 libgo: fix ptrace syscall hooks into glibc
ptrace is actually declared as a variadic function.  On ppc64le
the ABI requires to the caller to allocate space for the parameters
and allows the caller to modify them.

On ppc64le, depending on how and what version of GCC is used,
it will save to parameter save area.  This happened to clobber
a saved LR, and caused syscall.TestExecPtrace to fail with a timeout
when the tracee segfaults, and waits for the parent process to inspect.

Wrap this function to avoid directly calling glibc's ptrace from go.

Fixes golang/go#36698
Fixes go/92567

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/254755
2020-09-17 12:14:09 -07:00
Ian Lance Taylor f75af8c146 libgo: update to go1.15rc1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245157
2020-08-01 11:21:40 -07:00
Ian Lance Taylor 4f157ed774 syscall: append to environment in tests, don't clobber it
This is a partial backport of https://golang.org/cl/233318.
It's only a partial backport because part of the change was
already applied to libgo in CL 193497 as part of the update
to the Go 1.13beta1 release.

Fixes PR go/95061

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233359
2020-05-11 17:27:46 -07:00
Ian Lance Taylor 0b3c2eed35 libgo: update to Go1.14rc1 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/218017
2020-02-15 09:14:10 -08:00
Ian Lance Taylor 79530f94e9 syscall: fix riscv64 GNU/Linux build
Make syscall_linux_riscv64.go, new in the 1.14beta1 release, look like
the other syscall_linux_GOARCH.go files.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/217577
2020-02-03 18:14:19 -08:00
Ian Lance Taylor 66af5a226a runtime, syscall: add a couple of hurd build tags
Patch by Svante Signell.

Updates PR go/93468

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216959
2020-01-29 16:43:57 -08:00
Ian Lance Taylor 5a8ea16592 libgo: update to Go1.14beta1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214297
2020-01-21 23:53:22 -08:00
Ian Lance Taylor f2a8799309 re PR go/93020 (Final patches to build gcc-10 on GNU/Hurd)
PR go/93020
    libgo: Hurd portability patches
    
    By Svante Signell.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/212409

From-SVN: r279724
2019-12-24 05:05:32 +00:00
Ian Lance Taylor 656297e1fe libgo: update to Go1.13
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194698

From-SVN: r275691
2019-09-12 23:22:53 +00:00
Ian Lance Taylor aa8901e9bb libgo: update to Go 1.13beta1 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497

From-SVN: r275473
2019-09-06 18:12:46 +00:00
Ian Lance Taylor 8b33101442 re PR go/90614 (gcc-9.1.0/libgo/go/syscall/wait.c:54:22: error: unused parameter ‘w’ [-Werror=unused-parameter] Continued (uint32_t *w))
PR go/90614
    syscall: avoid unused parameter error if WIFCONTINUED not defined
    
    Fixes https://gcc.gnu.org/PR90614
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/178997

From-SVN: r271638
2019-05-27 00:10:34 +00:00
Ian Lance Taylor f4488799b2 libgo/go/syscall: add SockAddrDatalink on AIX
This patch is required in order to build golang.org/x/net. The
    corresponding Go Toolchain patch is CL 170537.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/172898

From-SVN: r270458
2019-04-19 14:20:16 +00:00
Ian Lance Taylor 04862afe9f libgo: update to Go 1.12.2
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170706

From-SVN: r270214
2019-04-08 18:36:25 +00:00
Ian Lance Taylor 9195aa172b libgo: fix build on AIX
Since aix/ppc64 has been added to GC toolchain, a mix between new and
    old files were created in gcc toolchain.
    This commit corrects this merge for aix/ppc64 and aix/ppc.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167658

From-SVN: r269797
2019-03-19 14:00:59 +00:00
Ian Lance Taylor ee973155b2 re PR go/89447 (libgo largefile support is incomplete and inconsistent)
PR go/89447
    syscall, internal/syscall: adjust use of largefile functions
    
    Consistently call __go_openat for openat.  Use fstatat64, creat64,
    sendfile64, and getdents64 where needed.
    
    Based on patch by Rainer Orth.
    
    Fixes https://gcc.gnu.org/PR89447
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166420

From-SVN: r269521
2019-03-09 02:10:22 +00:00
Ian Lance Taylor 4fd3c8aad9 libgo: update to Go 1.12 release
Reviewed-on: https://go-review.googlesource.com/c/163742

From-SVN: r269216
2019-02-26 15:38:12 +00:00
Ian Lance Taylor 8a9f2a6bbd compiler, runtime: harmonize types referenced by both C and Go
Compiling with LTO revealed a number of cases in the runtime and
    standard library where C and Go disagreed about the type of an object or
    function (or where Go and code generated by the compiler disagreed). In
    all cases the underlying representation was the same (e.g., uintptr vs.
    void*), so this wasn't causing actual problems, but it did result in a
    number of annoying warnings when compiling with LTO.
    
    Reviewed-on: https://go-review.googlesource.com/c/160700

From-SVN: r268923
2019-02-15 01:57:51 +00:00
Ian Lance Taylor 2faf2a305d syscall: don't assume that WIFCONTINUED is defined
It's not defined on the Hurd.
    
    Reviewed-on: https://go-review.googlesource.com/c/161963

From-SVN: r268828
2019-02-12 21:29:52 +00:00
Ian Lance Taylor 18591d3ee7 os, syscall: Hurd fixes for a couple of tests
Based on patch by Svante Signell.
    
    Reviewed-on: https://go-review.googlesource.com/c/161520

From-SVN: r268605
2019-02-07 05:02:26 +00:00
Ian Lance Taylor 4321f202f9 syscall: add Hurd support
Loosely based on a patch by Svante Signell.
    
    Reviewed-on: https://go-review.googlesource.com/c/161518

From-SVN: r268603
2019-02-07 03:11:47 +00:00
Ian Lance Taylor 59ea40d0f2 libgo: add hurd build tags to test files
Patch by Svante Signell.
    
    Reviewed-on: https://go-review.googlesource.com/c/160823

From-SVN: r268460
2019-02-01 22:11:50 +00:00
Ian Lance Taylor 27d6b51071 libgo: add hurd build tags
Patch by Svante Signell.
    
    Reviewed-on: https://go-review.googlesource.com/c/160822

From-SVN: r268459
2019-02-01 21:57:36 +00:00
Ian Lance Taylor 4f4a855d82 libgo: update to Go1.12beta2
Reviewed-on: https://go-review.googlesource.com/c/158019

gotools/:
	* Makefile.am (go_cmd_vet_files): Update for Go1.12beta2 release.
	(GOTOOLS_TEST_TIMEOUT): Increase to 600.
	(check-runtime): Export LD_LIBRARY_PATH before computing GOARCH
	and GOOS.
	(check-vet): Copy golang.org/x/tools into check-vet-dir.
	* Makefile.in: Regenerate.

gcc/testsuite/:
	* go.go-torture/execute/names-1.go: Stop using debug/xcoff, which
	is no longer externally visible.

From-SVN: r268084
2019-01-18 19:04:36 +00:00
Ian Lance Taylor a6804ea929 syscall: mark C syscall functions noescape
Many C syscall functions take pointer arguments. The pointers
    don't escape in the C functions. Mark the C functions noescape so
    calling them doesn't need allocation.
    
    Reviewed-on: https://go-review.googlesource.com/c/158158

From-SVN: r267989
2019-01-16 22:38:33 +00:00
Ian Lance Taylor 9cf3cb7c25 syscall: remove Flock for aix/ppc64
CL 152397 removed it from gc's syscall package.
    
    Updates golang/go#29084
    
    Reviewed-on: https://go-review.googlesource.com/c/152557

From-SVN: r266812
2018-12-05 01:11:02 +00:00
Ian Lance Taylor dd554b787d syscall: don't assume we have a GETEUID system call
On Alpha GNU/Linux there is no geteuid system call, there is only
    getresuid.  The raw geteuid system call is only used for testing, so
    just skip the test if it's not available.
    
    Reviewed-on: https://go-review.googlesource.com/137655

From-SVN: r264647
2018-09-26 15:17:30 +00:00
Ian Lance Taylor dd931d9b48 libgo: update to Go 1.11
Reviewed-on: https://go-review.googlesource.com/136435

gotools/:
	* Makefile.am (mostlyclean-local): Run chmod on check-go-dir to
	make sure it is writable.
	(check-go-tools): Likewise.
	(check-vet): Copy internal/objabi to check-vet-dir.
	* Makefile.in: Rebuild.

From-SVN: r264546
2018-09-24 21:46:21 +00:00