public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-6678] libgo: update hurd support
@ 2021-01-14 17:57 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2021-01-14 17:57 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9ac3e2feb3da89eda7a783d2c675ec897e81b338
commit r11-6678-g9ac3e2feb3da89eda7a783d2c675ec897e81b338
Author: Ian Lance Taylor <iant@golang.org>
Date: Wed Jan 13 11:54:15 2021 -0800
libgo: update hurd support
Patch from Svante Signell.
Fixes PR go/98496
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/283692
Diff:
---
gcc/go/gofrontend/MERGE | 2 +-
libgo/Makefile.am | 2 +-
libgo/Makefile.in | 2 +-
libgo/go/crypto/x509/root_hurd.go | 6 ++++++
libgo/go/runtime/export_pipe2_test.go | 2 +-
libgo/go/runtime/nbpipe_test.go | 2 +-
libgo/go/runtime/os_hurd.go | 18 +++++++++---------
libgo/misc/cgo/test/cthread_unix.c | 2 +-
8 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index cd95c3d0755..8cfc63248a7 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-255657dc8d61ab26121ca68f124412ef37599166
+fd5396b1af389a55d1e3612702cfdad6755084e9
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 2e8c37e170d..6188725f73b 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -881,7 +881,7 @@ GOBENCH =
CHECK = \
GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \
export GC; \
- GOLIBS="$(extra_check_libs_$(subst .,_,$(subst /,_,$(@D)))) $(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \
+ GOLIBS="$(extra_check_libs_$(subst .,_,$(subst /,_,$(@D)))) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \
export GOLIBS; \
RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
export RUNTESTFLAGS; \
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 34b0e1d0056..daae4f842d7 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -1029,7 +1029,7 @@ GOBENCH =
CHECK = \
GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \
export GC; \
- GOLIBS="$(extra_check_libs_$(subst .,_,$(subst /,_,$(@D)))) $(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \
+ GOLIBS="$(extra_check_libs_$(subst .,_,$(subst /,_,$(@D)))) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \
export GOLIBS; \
RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
export RUNTESTFLAGS; \
diff --git a/libgo/go/crypto/x509/root_hurd.go b/libgo/go/crypto/x509/root_hurd.go
index 59e9ff0c81b..a25b8a1bc08 100644
--- a/libgo/go/crypto/x509/root_hurd.go
+++ b/libgo/go/crypto/x509/root_hurd.go
@@ -9,3 +9,9 @@ package x509
var certFiles = []string{
"/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc.
}
+
+// Possible directories with certificate files; stop after successfully
+// reading at least one file from a directory.
+var certDirectories = []string{
+ "/etc/ssl/certs", // SLES10/SLES11, https://golang.org/issue/12139
+}
diff --git a/libgo/go/runtime/export_pipe2_test.go b/libgo/go/runtime/export_pipe2_test.go
index 9d580d33134..209c6b14a11 100644
--- a/libgo/go/runtime/export_pipe2_test.go
+++ b/libgo/go/runtime/export_pipe2_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build freebsd linux netbsd openbsd solaris
+// +build freebsd hurd linux netbsd openbsd solaris
package runtime
diff --git a/libgo/go/runtime/nbpipe_test.go b/libgo/go/runtime/nbpipe_test.go
index 981143ec27b..d7c5d45c854 100644
--- a/libgo/go/runtime/nbpipe_test.go
+++ b/libgo/go/runtime/nbpipe_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris
package runtime_test
diff --git a/libgo/go/runtime/os_hurd.go b/libgo/go/runtime/os_hurd.go
index 1613b410e2c..8bde23edb81 100644
--- a/libgo/go/runtime/os_hurd.go
+++ b/libgo/go/runtime/os_hurd.go
@@ -27,19 +27,19 @@ func libc_malloc(uintptr) unsafe.Pointer
//go:noescape
//extern sem_init
-func sem_init(sem *_sem_t, pshared int32, value uint32) int32
+func sem_init(sem *semt, pshared int32, value uint32) int32
//go:noescape
//extern sem_wait
-func sem_wait(sem *_sem_t) int32
+func sem_wait(sem *semt) int32
//go:noescape
//extern sem_post
-func sem_post(sem *_sem_t) int32
+func sem_post(sem *semt) int32
//go:noescape
//extern sem_timedwait
-func sem_timedwait(sem *_sem_t, timeout *timespec) int32
+func sem_timedwait(sem *semt, timeout *timespec) int32
//go:noescape
//extern clock_gettime
@@ -51,12 +51,12 @@ func semacreate(mp *m) {
return
}
- var sem *_sem_t
+ var sem *semt
// Call libc's malloc rather than malloc. This will
// allocate space on the C heap. We can't call malloc
// here because it could cause a deadlock.
- sem = (*_sem_t)(libc_malloc(unsafe.Sizeof(*sem)))
+ sem = (*semt)(libc_malloc(unsafe.Sizeof(*sem)))
if sem_init(sem, 0, 0) != 0 {
throw("sem_init")
}
@@ -86,7 +86,7 @@ func semasleep(ns int64) int32 {
ts.tv_sec = timespec_sec_t(sec)
ts.tv_nsec = timespec_nsec_t(nsec)
- if sem_timedwait((*_sem_t)(unsafe.Pointer(_m_.waitsema)), &ts) != 0 {
+ if sem_timedwait((*semt)(unsafe.Pointer(_m_.waitsema)), &ts) != 0 {
err := errno()
if err == _ETIMEDOUT || err == _EAGAIN || err == _EINTR {
return -1
@@ -96,7 +96,7 @@ func semasleep(ns int64) int32 {
return 0
}
for {
- r1 := sem_wait((*_sem_t)(unsafe.Pointer(_m_.waitsema)))
+ r1 := sem_wait((*semt)(unsafe.Pointer(_m_.waitsema)))
if r1 == 0 {
break
}
@@ -110,7 +110,7 @@ func semasleep(ns int64) int32 {
//go:nosplit
func semawakeup(mp *m) {
- if sem_post((*_sem_t)(unsafe.Pointer(mp.waitsema))) != 0 {
+ if sem_post((*semt)(unsafe.Pointer(mp.waitsema))) != 0 {
throw("sem_post")
}
}
diff --git a/libgo/misc/cgo/test/cthread_unix.c b/libgo/misc/cgo/test/cthread_unix.c
index 247d636d06d..e56a77e39a3 100644
--- a/libgo/misc/cgo/test/cthread_unix.c
+++ b/libgo/misc/cgo/test/cthread_unix.c
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris
#include <pthread.h>
#include "_cgo_export.h"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-14 17:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 17:57 [gcc r11-6678] libgo: update hurd support Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).