Commit Graph

1235 Commits

Author SHA1 Message Date
Ian Lance Taylor 8c3238510c libgo: don't include <linux/fs.h> when building gen-sysinfo.go
Removing this doesn't change anything at least with glibc 2.33.
The include was added in https://go.dev/cl/6100049 but it's not
clear why.

Fixes PR go/106266

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/417294
(cherry picked from commit f35d65517a)
2022-07-21 14:04:38 +02:00
Ian Lance Taylor 3c8e29c81b runtime: cast SIGSTKSZ to uintptr
PR go/99458
	* libgo/runtime/proc.c: cast SIGSTKSZ to uintptr
	In newer versions of glibc it is long, which causes a signed
	comparison warning.
2021-03-08 16:16:50 -08:00
Ian Lance Taylor b516216f5f compiler: set varargs correctly for type of method expression
Fixes golang/go#41737

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/258977
2020-10-01 16:31:36 -07:00
Ian Lance Taylor b59b9cb483 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:12:25 -07:00
Ian Lance Taylor 6b31ebb3fe libgo: update to Go 1.14.6 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/243317
2020-07-23 19:48:48 -07:00
Ian Lance Taylor a5c9fb7995 libgo: update to Go 1.14.4 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/241999
2020-07-10 11:32:58 -07:00
Ian Lance Taylor fbfa806e65 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:29:25 -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
Ian Lance Taylor 9e16359ce8 runtime: for Solaris, add osinit, and drop duplicate getncpu
Fixes a build breakage introduced in the 1.14beta1 upgrade.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215857
2020-01-22 15:08:25 -08:00
Andrew Pinski 26afdf5070 internal/syscall/unix: use getrandom_linux_generic.go on arm64be
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215342
2020-01-22 15:05:26 -08:00
Ian Lance Taylor 68cbbe7cdc runtime: call runtime_nanotime1, not runtime_nanotime
The function name was changed in 1.14beta1. Fix the non-x86, non-s390 code.

Fixes golang/go#36694

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215724
2020-01-22 11:14:52 -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 3a33f87ffb gotest: don't use local
It's not part of the POSIX shell standard.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214300

From-SVN: r280118
2020-01-10 15:28:20 +00:00
Ian Lance Taylor fcee603081 libgo: compile examples in _test packages
Previously if the only names defined by _test packages were examples,
    the gotest script would emit an incorrect _testmain.go file.
    I worked around that by marking the example_test.go files +build ignored.
    
    This CL changes the gotest script to handle this case correctly,
    and removes the now-unnecessary build tags.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214039

From-SVN: r280085
2020-01-09 23:14:57 +00:00
Ian Lance Taylor 81f025b580 compiler, runtime: stop using __go_runtime_error
Use specific panic functions instead, which are mostly already in the
    runtime package.
    
    Also correct "defer nil" to panic when we execute the defer, rather
    than throw when we queue it.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/213642

From-SVN: r279979
2020-01-07 23:13:24 +00:00
Ian Lance Taylor 10172a64ce compiler, runtime, reflect: generate hash functions only for map keys
Right now we generate hash functions for all types, just in case they
    are used as map keys. That's a lot of wasted effort and binary size
    for types which will never be used as a map key. Instead, generate
    hash functions only for types that we know are map keys.
    
    Just doing that is a bit too simple, since maps with an interface type
    as a key might have to hash any concrete key type that implements that
    interface. So for that case, implement hashing of such types at
    runtime (instead of with generated code). It will be slower, but only
    for maps with interface types as keys, and maybe only a bit slower as
    the aeshash time probably dominates the dispatch time.
    
    Reorg where we keep the equals and hash functions. Move the hash function
    from the key type to the map type, saving a field in every non-map type.
    That leaves only one function in the alg structure, so get rid of that and
    just keep the equal function in the type descriptor itself.
    
    While we're here, reorganize the rtype struct to more closely match
    the gc version.
    
    This is the gofrontend version of https://golang.org/cl/191198.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/212843

From-SVN: r279848
2020-01-02 21:55:32 +00: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 763c9f4a85 re PR go/92861 (Passes relative time to sem_timedwait on GNU/Hurd)
PR go/92861
    runtime: don't define CLOCK_REALTIME in os_hurd.go
    
    It's already defined in sysinfo.go.
    
    Patch by Samuel Thibault.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/210538

From-SVN: r279136
2019-12-09 18:03:53 +00:00
Ian Lance Taylor 9135a6ffc5 re PR go/92861 (Passes relative time to sem_timedwait on GNU/Hurd)
PR go/92861
    runtime: use absolute time for sem_timedwait
    
    Patch by Samuel Thibault.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/210457

From-SVN: r279106
2019-12-09 03:43:33 +00:00
Ian Lance Taylor eff6af8e0e re PR go/92820 (libgo.so.15 has executable stack)
PR go/92820
    runtime: only build go-context for x86 GNU/Linux
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/210258

From-SVN: r279063
2019-12-06 19:52:46 +00:00
Ian Lance Taylor 5ec7a413d1 re PR other/29842 ([meta-bug] outstanding patches / issues from STMicroelectronics)
PR go/29842
    runtime: update HURD support for mOS now being embedded
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/210285

From-SVN: r279062
2019-12-06 19:37:39 +00:00
Ian Lance Taylor 9961856c3a re PR go/92810 (Compiling GCC go for aarch64_be-marvell-linux-gnu fails)
PR go/92810
    libgo: recognize aarch64_be as arm64be
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/210038

From-SVN: r279032
2019-12-06 05:32:49 +00:00
Ian Lance Taylor 9bcee9c9a1 re PR go/92820 (libgo.so.15 has executable stack)
PR go/92820
    runtime: always mark assembly file as non-executable stack
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/210037

From-SVN: r279010
2019-12-05 17:51:10 +00:00
Ian Lance Taylor b4b7464b57 re PR go/92605 (r278509 causes/reveals issue in building go library)
PR go/92605
    runtime: declare runtime_usestackmaps in stack.c, not runtime.h
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/208161

From-SVN: r278540
2019-11-21 01:06:47 +00:00
Ian Lance Taylor 025f56b7d3 mksysinfo: use type aliases for time struct field types
Also fix a case where grep wasn't redirecting to /dev/null.
    
    Fixes golang/go#35713
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/208160

From-SVN: r278539
2019-11-21 01:03:55 +00:00
Ian Lance Taylor 0c6ce0ae55 libgo: better cmd/cgo handling for '.' in pkgpath
Updates cgo's gccgoPkgpathToSymbolNew() to bring it into
    conformance with the way that gccgo now handles package
    paths with embedded dots (see CL 200838). See also
    https://gcc.gnu.org/PR61880, a related bug. This CL is a
    copy of CL 207957 in the main Go repo.
    
    Updates golang/go#35623.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/207977

From-SVN: r278470
2019-11-19 23:04:08 +00:00
Ian Lance Taylor ae0b0fc6ae testmain.exp: link against GOLIBS
Patch by Maciej W. Rozycki.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/207458

From-SVN: r278316
2019-11-15 21:14:29 +00:00
Ian Lance Taylor b72813a68c libgo: fix DejaGNU testsuite compiler when using build sysroot
Patch by Maciej W. Rozycki.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/206577

From-SVN: r278070
2019-11-11 23:28:54 +00:00
Ian Lance Taylor 2dccdbcff6 runtime: correct facilities names in s390 CPU support
Patch from Andreas Krebbel.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/201038

From-SVN: r276964
2019-10-14 14:10:16 +00:00
Ian Lance Taylor d2317d50ae internal/cpu: define kdsaQuery for s390
Patch from Andreas Krebbel.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/201037

From-SVN: r276962
2019-10-14 14:01:15 +00:00
Ian Lance Taylor b7c4123032 runtime: mark go-context.S as no-executable-stack and split-stack supported
The .note.GNU-stack section tells the linker that this object does not
    require an executable stack.
    
    The .note.GNU-split-stack section tells the linker that functions in
    this object can be called directly by split-stack functions, without
    require a large stack.
    
    The .note.GNU-no-split-stack section tells the linker that functions
    in this object do not have a split-stack prologue.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/198440

From-SVN: r276488
2019-10-02 20:11:35 +00:00
Ian Lance Taylor ab2d47a87f libgo: support gollvm build on arm64 linux
This CL serves as part of an initial change for enabling gollvm
    building on arm64 linux, the rest of the change will be covered by
    another one to the gollvm repo.
    
    Incorporate type definition of 'uint128' to 'runtime' and 'syscall'
    packges, the change is not specific to arm64 linux but made available
    for all platforms.
    
    Verified by building and unit-testing gollvm on linux x86-64 and arm64.
    
    Verified by building and checking gccgo on linux x86-64 and arm64.
    
    Fixes golang/go#33711
    
    Change-Id: I4720c7d810cfd4ef720962fb4104c5641b2459c0

From-SVN: r275919
2019-09-19 00:03:25 +00:00