Commit Graph

1259 Commits

Author SHA1 Message Date
Ian Lance Taylor 10a83805e0 libgo: update to Go1.15.2 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/256618
2020-09-23 17:32:49 -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
Clément Chigot 63cd53d2f5 runtime, net: fix build errors on AIX
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/235158
2020-09-22 17:29:52 -07:00
Clément Chigot be3027e9c8 go/internal/gccgoimporter: recognize aixbigafMagic archives
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/255201
2020-09-21 15:42:00 -07:00
Ian Lance Taylor 68402af1c6 libgo: don't put golang.org packages in zstdpkglist.go
This ensures that internal/goroot.IsStandardPackage does not treat
golang.org packages as being in the standard library.

For golang/go#41368
Fixes golang/go#41499

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/256319
2020-09-21 14:11:01 -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
Than McIntosh 1d7d3f91ab libgo: additional type/const references in sysinfo.c
Add a few more explicit references to enumeration constants
(RUSAGE_SELF, DT_UNKNOWN) in sysinfo.c to insure that their hosting enums
are emitted into DWARF, when using a clang host compiler during
the gollvm build.

Updates golang/go#41382.
Updates golang/go#41404.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/254941
2020-09-15 17:41:57 -07:00
Maciej W. Rozycki cad843c7e7 gotest: use a space rather than a middle dot in target lists
Replace the U+00B7 middle dot character, placed after "mips64p32le"
in the target lists, with a space.  The U+00B7 character may not be
considered whitespace by Bourne shell and any non-ASCII character
may render incorrectly in some terminal devices.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/251177
2020-08-27 16:18:01 -07:00
Clément Chigot 0c223b02b6 cmd: add -maix32 to gcc calls for aix/ppc
As gcc might now be compiled in 64bit, -maix32 must always be added
to ensure that created objects will be 32bit.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/250778
2020-08-26 16:29:03 -07:00
Clément Chigot 6b0b6a3868 libgo: add FAT library support for static libraries on AIX
Like shared libraries, AIX static libraries must also have both 32 and
64 bit objects.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/250777
2020-08-26 16:18:06 -07:00
Clément Chigot d040555a06 libgo: correctly handle AIX FAT library creation
The previous patch wasn't working everytime. Especially when AR had
"-X32_64", the new .so would replace the default one and not just being
added.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/247377
2020-08-12 11:33:54 -07:00
Ian Lance Taylor 8f9fd3c4ee internal/syscall/unix: restore ppc build tag
It was accidentally lost in the 1.15rc1 merge.

Fixes PR go/96567

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/247843
2020-08-11 12:28:46 -07:00
Clément Chigot f4b9b13680 runtime: revert eqtype for AIX
AIX linker is not able to merge identical type descriptors in a single
symbol if there are coming from different object or shared object files.
This results into several pointers referencing the same type
descriptors.
Thus, eqtype is needed to ensure that these different symbols will be
considered as the same type descriptor.

Fixes golang/go#39276

gcc/go/ChangeLog:

	* go-c.h (struct go_create_gogo_args): Add need_eqtype field.
	* go-lang.c (go_langhook_init): Set need_eqtype.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/235697
2020-08-10 16:45:16 -07:00
Ian Lance Taylor 10c8507372 libgo: update to Go1.15rc2 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/247517
2020-08-07 17:22:33 -07:00
Ian Lance Taylor 76eb0434a4 internal/syscall/unix: correct ia64 syscall numbers
Per Andreas Schwab.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/246264
2020-08-03 11:03:40 -07:00
Ian Lance Taylor d8ea6acb5f internal/syscall/unix: define copyFileRangeTrap for all architectures
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/246363
2020-08-03 10:12:31 -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 108fdcc56e compiler,runtime: pass only ptr and len to some runtime calls
This ports https://golang.org/cl/227163 to the Go frontend.
This is a step toward moving up to the go1.15rc1 release.

Original CL description:

    cmd/compile,runtime: pass only ptr and len to some runtime calls

    Some runtime calls accept a slice, but only use ptr and len.
    This change modifies most such routines to accept only ptr and len.

    After this change, the only runtime calls that accept an unnecessary
    cap arg are concatstrings and slicerunetostring.
    Neither is particularly common, and both are complicated to modify.

    Negligible compiler performance impact. Shrinks binaries a little.
    There are only a few regressions; the one I investigated was
    due to register allocation fluctuation.

    Passes 'go test -race std cmd', modulo golang/go#38265 and golang/go#38266.
    Wow, does that take a long time to run.

    file      before    after     Δ       %
    compile   19655024  19655152  +128    +0.001%
    cover     5244840   5236648   -8192   -0.156%
    dist      3662376   3658280   -4096   -0.112%
    link      6680056   6675960   -4096   -0.061%
    pprof     14789844  14777556  -12288  -0.083%
    test2json 2824744   2820648   -4096   -0.145%
    trace     11647876  11639684  -8192   -0.070%
    vet       8260472   8256376   -4096   -0.050%
    total     115163736 115118808 -44928  -0.039%

For golang/go#36890

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245099
2020-07-27 17:05:17 -07:00
Clément Chigot 83cc5e2b2f libgo: add AIX FAT libraries support
AIX-style libraries contains both 32 and 64 bit shared objects.
This patch follows the adding of FAT libraries support in other gcc
libraries (libgcc, listdc++, etc).

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/242957
2020-07-23 14:26:36 -07:00
Ian Lance Taylor d5dfd4793f libgo: update to Go 1.14.6 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/243317
2020-07-17 14:28:28 -07:00
Ian Lance Taylor 2b6d99468d libgo: update to Go 1.14.4 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/241999
2020-07-10 11:30:23 -07:00
Tobias Klauser 882af4350b libgo: update x/sys/cpu to add all GOARCHes supported by gccgo
CL 237897 added additional GOARCHes supported by gccgo to x/sys/cpu.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/238038
2020-06-15 14:20:07 -07:00
Tobias Klauser 47ad09cb08 internal/syscall/unix: use getrandom_linux_generic.go on riscv
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/237899
2020-06-15 12:00:12 -07:00
Clément Chigot 75452d6867 runtime: fix arenaBaseOffset for aix/ppc
The arenaBaseOffset modifications was aimed only for aix/ppc64.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/237038
2020-06-12 16:30:53 -07:00
Clément Chigot adad99eb90 libgo: update x/sys/cpu after gccgo support added
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234597
2020-05-25 13:43:44 -07:00
Ian Lance Taylor e478cacb62 libgo: only build syscall test with -static if it works
Test whether -static works, and use it if possible.

This time for sure.

For PR go/95061

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234024
2020-05-15 15:33:20 -07:00
Ian Lance Taylor 3a36428b5f libgo: only build syscall test with -static on GNU/Linux
For PR go/95061

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234019
2020-05-14 13:37:12 -07:00
Ian Lance Taylor 0d5d880994 libgo: build syscall test with -static
This avoids problems finding libgo.so when running the test as root,
which invokes the test as a child process in various limited environments.

Fixes PR go/95061

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233897
2020-05-13 11:45:55 -07:00
eric fang 5ca5751823 runtime: fix TestCallersNilPointerPanic
The expected result of TestCallersNilPointerPanic has changed in
GoLLVM.  This CL makes some elements of the expected result optional
so that this test passes in both gccgo and GoLLVM.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/230138
2020-05-11 17:36:24 -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
eric fang ef8dc9d240 gotest: increase the test timeout
The default test timeout duration of the gc compiler is 10 minutes,
and the current default timeout duration of gofrontend is 240 seconds,
which is not long enough for some big tests. This CL changes it to
600s, so that all tests have enough time to complete.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/229657
2020-04-23 20:16:32 -07:00
Benny Siegert 8e841bd419 gccgo: fix runtime compilation on NetBSD
si_code in siginfo_t is a macro on NetBSD, not a member of the
struct itself, so add a C trampoline for receiving its value.

Also replace references to mos.waitsemacount with the replacement and
add some helpers from os_netbsd.go in the GC repository.

Update golang/go#38538.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/228918
2020-04-20 21:20:53 -07:00
eric fang 677ead3b34 runtime: use 64 bits of hash seed on arm64
This is the same issue as #33960, but on gofrontend.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/220297
2020-04-15 14:24:33 -07:00
Ian Lance Taylor d79a22eddc libgo: update to final 1.14.2 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/227551
2020-04-09 20:14:25 -07:00
Ian Lance Taylor 52fa80f853 libgo: update to almost the 1.14.2 release
Update to edea4a79e8d7dea2456b688f492c8af33d381dc2 which is likely to
be approximately the 1.14.2 release.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/227377
2020-04-06 16:37:24 -07:00
eric fang 3f469f585e runtime: handle linux/arm64 signal register
Set sigpc and implement dumpregs for linux/arm64.
Without this change, cmd/vet tool test will fail randomly.

Updates golang/go#20931

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/220543
2020-02-28 12:24:21 -08:00
Ian Lance Taylor c5decc83e4 libgo: update to final Go1.14 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/221158
2020-02-26 12:19:13 -08:00
Ian Lance Taylor a4dbb9b25a internal/poll: add hurd build tag
Patch from Svante Signell.

Fixes GCC PR go/93900

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/220592
2020-02-24 09:29:51 -08:00
Ian Lance Taylor 027a3f1c38 internal/syscall/unix: add hurd build tag
Patch from Svante Signell.

Fixes GCC PR go/93900

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/220589
2020-02-24 06:42:05 -08:00
Ian Lance Taylor 855b4aaeab cmd/go: update -DGOPKGPATH to use current pkgpath encoding
This will need to be done in the gc version too, probably more cleverly.
This version will ensure that the next GCC release works correctly
when using the GCC version of the go tool.

Updates golang/go#37272

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/219817
2020-02-18 12:03:13 -08:00
Ian Lance Taylor 72700543b6 libgo: install internal/reflectlite.gox
This makes it possible to use gccgo to bootstrap Go 1.14.
If we don't install this, gccgo can't compile the sort package.

Fixes GCC PR go/93679

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/219617
2020-02-16 05:20:26 -08: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 17edb3310d runtime: on 32-bit systems, limit default GOMAXPROCS to 32
Otherwise we can easily run out of stack space for threads.

The user can still override by setting GOMAXPROCS.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/219278
2020-02-15 09:12:18 -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 68f3759eff runtime: update netpoll_hurd.go for go1.14beta1 changes
Patch from Svante Signell.

Updates PR go/93468

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216958
2020-01-29 16:40:19 -08:00
Ian Lance Taylor ba386bea11 libgo: handle --with-toolexeclibdir=.
Patch by Maciej W. Rozycki.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216239
2020-01-24 06:33:46 -08:00
Ian Lance Taylor 1e156d9b21 internal/cpu: don't define CacheLinePadSize for riscv64
In libgo CacheLinePadSize is defined by the generated file cpugen.go.

Keep cpu_riscv64.go around, even though it is now empty, so that
we will pick up changes to it in future merges.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216077
2020-01-23 16:05:47 -08:00
Ian Lance Taylor 92bea423c2 gotest: explicitly skip type descriptors
Type descriptors are normally weak and nm will report them as V,
so we will skip them when collecting the list of symbols.
But when not using GNU nm, they may be reported as D,
so also skip them in symstogo.

This fixes go/doc/check on Solaris.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215900
2020-01-22 20:53:43 -08:00