On Mon, Sep 9, 2019 at 1:26 AM Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > > > I've committed a patch to update libgo to the Go 1.13beta1 release. > > As is usual with these updates, the patch is too large to include > > here; I've included the diffs of the various GCC-specific configury > > and other files. Bootstrapped and ran Go testsuite on > > x86_64-pc-linux-gnu. Committed to mainline. > > this patch caused quite some fallout on Solaris, both SPARC and x86: > > * The golang.org/x/net/lif package won't build: > > make[4]: *** No rule to make target 'golang.org/x/net/lif.gox', needed by > 'net.lo'. Stop. > > It moved from go/internal/x/net/lif/lif.go to > go/golang.org/x/net/lif/lif.go, but neither was Makefile.am adapted to > reflect this nor the Solaris fixes in the old version carried over to > the new location. > > * go/runtime/os_solaris.go doesn't compile: > > /vol/gcc/src/hg/trunk/local/libgo/go/runtime/os_solaris.go:34:7: error: > reference to undefined field or method ‘mos’ > 34 | if mp.mos.waitsema != 0 { > | ^ > > and several more instances. Caused by losing the explict mos member > of m in go/runtime/runtime2.go, fixed by dropping it here, to. > > * As Bernd mentioned, go/golang.org/x/sys/cpu/cpu_gccgo.{c, go} don't > compile on non-x86 systems due to lack of <cpuid.h>. Fixed by > restricting to 386 or amd64 and wrapping the C code in __i386__ || > __x86_64__. > > * The go/golang.org/x/sys/cpu package doesn't compile on SPARC: > > /vol/gcc/src/hg/trunk/local/libgo/go/golang.org/x/sys/cpu/cpu.go:17:30: > error: reference to undefined name 'cacheLineSize' > 17 | type CacheLinePad struct{ _ [cacheLineSize]byte } > | ^ > make[8]: *** [Makefile:2826: golang.org/x/sys/cpu.lo] Error 1 > > For the moment, I've worked around this by introducing cpu_sparcx.go > with appropriate build tags. However, I'm uncertain what do do about > the actual value of cacheLineSize: the L1 D$ size is 16 on > UltraSPARC-T2, but 32 on SPARC-S7. > > With the attached patch, I can now bootstrap mainline on both > i386-pc-solaris2.11 and sparc-sun-solaris2.11. Test results are similar > to pre-1.13, but I'll have to check further.
Thanks. I've committed this patch, based on yours but somewhat different. Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 275608) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -2f6dd921a21351e94f55a5365a3176af563b5945 +bf4832d604e7522dee78fca76de220b62a131d54 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/Makefile.am =================================================================== --- libgo/Makefile.am (revision 275594) +++ libgo/Makefile.am (working copy) @@ -510,6 +510,14 @@ s-cpu: Makefile $(SHELL) $(srcdir)/mvifdiff.sh cpugen.go.tmp cpugen.go $(STAMP) $@ +gcpugen.go: s-gcpu; @true +s-gcpu: Makefile + rm -f gcpugen.go.tmp + echo "package cpu" > gcpugen.go.tmp + echo "const cacheLineSize = `$(SHELL) $(srcdir)/goarch.sh $(GOARCH) cachelinesize`" >> gcpugen.go.tmp + $(SHELL) $(srcdir)/mvifdiff.sh gcpugen.go.tmp gcpugen.go + $(STAMP) $@ + objabi.go: s-objabi; @true s-objabi: Makefile rm -f objabi.go.tmp @@ -773,7 +781,7 @@ GOLINK = $(LIBTOOL) --tag GO --mode-link BUILDDEPS = \ $(MKDIR_P) $(@D); \ dir=`echo $@ | sed -e 's/.lo.dep$$//'`; \ - files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$$dir --extrafiles="$(extra_go_files_$(subst /,_,$(subst .lo.dep,,$@)))" $(matchargs_$(subst /,_,$(subst .lo.dep,,$@)))`; \ + files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$$dir --extrafiles="$(extra_go_files_$(subst .,_,$(subst /,_,$(subst .lo.dep,,$@))))" $(matchargs_$(subst /,_,$(subst .lo.dep,,$@)))`; \ $(SHELL) $(srcdir)/godeps.sh `echo $@ | sed -e 's/.dep$$//'` $$files > $@.tmp; \ if ! cmp $@.tmp $@ >/dev/null 2>/dev/null; then \ rm -f `echo $@ | sed -e 's/\.dep$$//'`; \ @@ -804,7 +812,7 @@ GOBENCH = CHECK = \ GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \ export GC; \ - GOLIBS="$(extra_check_libs_$(subst /,_,$(@D))) $(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \ + GOLIBS="$(extra_check_libs_$(subst .,_,$(subst /,_,$(@D)))) $(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \ export GOLIBS; \ RUNTESTFLAGS="$(RUNTESTFLAGS)"; \ export RUNTESTFLAGS; \ @@ -818,7 +826,7 @@ CHECK = \ export LD_LIBRARY_PATH; \ $(MKDIR_P) $(@D); \ rm -f $@-testsum $@-testlog; \ - files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$(@D) --extrafiles="$(extra_go_files_$(subst /,_,$(@D)))" $(matchargs_$(subst /,_,$(@D)))`; \ + files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$(@D) --extrafiles="$(extra_go_files_$(subst .,_,$(subst /,_,$(@D))))" $(matchargs_$(subst /,_,$(@D)))`; \ if test "$(USE_DEJAGNU)" = "yes"; then \ $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --testname="$(@D)" $(GOTESTFLAGS); \ elif test "$(GOBENCH)" != ""; then \ @@ -951,6 +959,9 @@ runtime/internal/sys.lo.dep: $(extra_go_ extra_go_files_internal_cpu = cpugen.go internal/cpu.lo.dep: $(extra_go_files_internal_cpu) +extra_go_files_golang_org_x_sys_cpu = gcpugen.go +golang.org/x/sys/cpu.lo.dep: $(extra_go_files_golang_org_x_sys_cpu) + extra_go_files_internal_goroot = zstdpkglist.go internal/goroot.lo.dep: $(extra_go_files_internal_goroot) @@ -1047,34 +1058,27 @@ endif if LIBGO_IS_BSD -# Build internal/x/net/route only on BSD systems. +# Build golang.org/x/net/route only on BSD systems. -$(eval $(call PACKAGE_template,internal/x/net/route)) +$(eval $(call PACKAGE_template,golang.org/x/net/route)) golangorg_x_net_route_lo = \ golang.org/net/route.lo -golangorg_x_net_route_check = \ - golang.org/x/net/route/check endif if LIBGO_IS_SOLARIS -# Build internal/x/net/lif only on Solaris systems. +# Build golang.org/x/net/lif only on Solaris systems. -$(eval $(call PACKAGE_template,internal/x/net/lif)) +$(eval $(call PACKAGE_template,golang.org/x/net/lif)) golangorg_x_net_lif_lo = \ golang.org/x/net/lif.lo -golangorg_x_net_lif_check = \ - golang.org/x/net/lif/check endif -TPACKAGES = $(shell cat $(srcdir)/check-packages.txt) -TEST_PACKAGES = $(addsuffix /check,$(TPACKAGES)) \ - $(golangorg_x_net_lif_check) \ - $(golangorg_x_net_route_check) +TEST_PACKAGES = $(addsuffix /check,$(shell cat $(srcdir)/check-packages.txt)) check: check-tail check-recursive: check-head Index: libgo/Makefile.in =================================================================== --- libgo/Makefile.in (revision 275594) +++ libgo/Makefile.in (working copy) @@ -973,7 +973,7 @@ GOLINK = $(LIBTOOL) --tag GO --mode-link BUILDDEPS = \ $(MKDIR_P) $(@D); \ dir=`echo $@ | sed -e 's/.lo.dep$$//'`; \ - files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$$dir --extrafiles="$(extra_go_files_$(subst /,_,$(subst .lo.dep,,$@)))" $(matchargs_$(subst /,_,$(subst .lo.dep,,$@)))`; \ + files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$$dir --extrafiles="$(extra_go_files_$(subst .,_,$(subst /,_,$(subst .lo.dep,,$@))))" $(matchargs_$(subst /,_,$(subst .lo.dep,,$@)))`; \ $(SHELL) $(srcdir)/godeps.sh `echo $@ | sed -e 's/.dep$$//'` $$files > $@.tmp; \ if ! cmp $@.tmp $@ >/dev/null 2>/dev/null; then \ rm -f `echo $@ | sed -e 's/\.dep$$//'`; \ @@ -1006,7 +1006,7 @@ GOBENCH = CHECK = \ GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \ export GC; \ - GOLIBS="$(extra_check_libs_$(subst /,_,$(@D))) $(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \ + GOLIBS="$(extra_check_libs_$(subst .,_,$(subst /,_,$(@D)))) $(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \ export GOLIBS; \ RUNTESTFLAGS="$(RUNTESTFLAGS)"; \ export RUNTESTFLAGS; \ @@ -1020,7 +1020,7 @@ CHECK = \ export LD_LIBRARY_PATH; \ $(MKDIR_P) $(@D); \ rm -f $@-testsum $@-testlog; \ - files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$(@D) --extrafiles="$(extra_go_files_$(subst /,_,$(@D)))" $(matchargs_$(subst /,_,$(@D)))`; \ + files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$(@D) --extrafiles="$(extra_go_files_$(subst .,_,$(subst /,_,$(@D))))" $(matchargs_$(subst /,_,$(@D)))`; \ if test "$(USE_DEJAGNU)" = "yes"; then \ $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --testname="$(@D)" $(GOTESTFLAGS); \ elif test "$(GOBENCH)" != ""; then \ @@ -1091,6 +1091,7 @@ runtime_internal_sys_lo_check_GOCFLAGS = runtime_pprof_check_GOCFLAGS = -static-libgo -fno-inline extra_go_files_runtime_internal_sys = version.go extra_go_files_internal_cpu = cpugen.go +extra_go_files_golang_org_x_sys_cpu = gcpugen.go extra_go_files_internal_goroot = zstdpkglist.go extra_go_files_go_types = gccgosizes.go extra_go_files_cmd_internal_objabi = objabi.go @@ -1121,20 +1122,10 @@ extra_check_libs_cmd_vet_internal_cfg = @LIBGO_IS_BSD_TRUE@golangorg_x_net_route_lo = \ @LIBGO_IS_BSD_TRUE@ golang.org/net/route.lo -@LIBGO_IS_BSD_TRUE@golangorg_x_net_route_check = \ -@LIBGO_IS_BSD_TRUE@ golang.org/x/net/route/check - @LIBGO_IS_SOLARIS_TRUE@golangorg_x_net_lif_lo = \ @LIBGO_IS_SOLARIS_TRUE@ golang.org/x/net/lif.lo -@LIBGO_IS_SOLARIS_TRUE@golangorg_x_net_lif_check = \ -@LIBGO_IS_SOLARIS_TRUE@ golang.org/x/net/lif/check - -TPACKAGES = $(shell cat $(srcdir)/check-packages.txt) -TEST_PACKAGES = $(addsuffix /check,$(TPACKAGES)) \ - $(golangorg_x_net_lif_check) \ - $(golangorg_x_net_route_check) - +TEST_PACKAGES = $(addsuffix /check,$(shell cat $(srcdir)/check-packages.txt)) MOSTLYCLEANFILES = \ s-runtime_sysinfo s-sigtab s-runtime-inc s-zstdpkglist \ s-libcalls s-libcalls-list s-syscall_arch s-gen-sysinfo s-sysinfo \ @@ -2629,6 +2620,14 @@ s-cpu: Makefile $(SHELL) $(srcdir)/mvifdiff.sh cpugen.go.tmp cpugen.go $(STAMP) $@ +gcpugen.go: s-gcpu; @true +s-gcpu: Makefile + rm -f gcpugen.go.tmp + echo "package cpu" > gcpugen.go.tmp + echo "const cacheLineSize = `$(SHELL) $(srcdir)/goarch.sh $(GOARCH) cachelinesize`" >> gcpugen.go.tmp + $(SHELL) $(srcdir)/mvifdiff.sh gcpugen.go.tmp gcpugen.go + $(STAMP) $@ + objabi.go: s-objabi; @true s-objabi: Makefile rm -f objabi.go.tmp @@ -2830,6 +2829,7 @@ runtime.lo.dep: $(extra_go_files_runtime syscall.lo.dep: $(extra_go_files_syscall) runtime/internal/sys.lo.dep: $(extra_go_files_runtime_internal_sys) internal/cpu.lo.dep: $(extra_go_files_internal_cpu) +golang.org/x/sys/cpu.lo.dep: $(extra_go_files_golang_org_x_sys_cpu) internal/goroot.lo.dep: $(extra_go_files_internal_goroot) go/types.lo.dep: $(extra_go_files_go_types) cmd/internal/objabi.lo.dep: $(extra_go_files_cmd_internal_objabi) @@ -2886,13 +2886,13 @@ golang.org/x/sys/cpu_gccgo.lo: go/golang @$(MKDIR_P) golang.org/x/sys $(LTCOMPILE) -c -o $@ $(srcdir)/go/golang.org/x/sys/cpu/cpu_gccgo.c -# Build internal/x/net/route only on BSD systems. +# Build golang.org/x/net/route only on BSD systems. -@LIBGO_IS_BSD_TRUE@$(eval $(call PACKAGE_template,internal/x/net/route)) +@LIBGO_IS_BSD_TRUE@$(eval $(call PACKAGE_template,golang.org/x/net/route)) -# Build internal/x/net/lif only on Solaris systems. +# Build golang.org/x/net/lif only on Solaris systems. -@LIBGO_IS_SOLARIS_TRUE@$(eval $(call PACKAGE_template,internal/x/net/lif)) +@LIBGO_IS_SOLARIS_TRUE@$(eval $(call PACKAGE_template,golang.org/x/net/lif)) check: check-tail check-recursive: check-head Index: libgo/go/golang.org/x/net/lif/syscall.go =================================================================== --- libgo/go/golang.org/x/net/lif/syscall.go (revision 275594) +++ libgo/go/golang.org/x/net/lif/syscall.go (working copy) @@ -11,18 +11,12 @@ import ( "unsafe" ) -//go:cgo_import_dynamic libc_ioctl ioctl "libc.so" - -//go:linkname procIoctl libc_ioctl - -var procIoctl uintptr - -func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno) +//extern __go_ioctl_ptr +func libc_ioctl(int32, int32, unsafe.Pointer) int32 func ioctl(s, ioc uintptr, arg unsafe.Pointer) error { - _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procIoctl)), 3, s, ioc, uintptr(arg), 0, 0, 0) - if errno != 0 { - return error(errno) + if libc_ioctl(int32(s), int32(ioc), arg) < 0 { + return syscall.GetErrno() } return nil } Index: libgo/go/golang.org/x/net/lif/zsys_solaris.go =================================================================== --- libgo/go/golang.org/x/net/lif/zsys_solaris.go (nonexistent) +++ libgo/go/golang.org/x/net/lif/zsys_solaris.go (working copy) @@ -0,0 +1,101 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_solaris.go + +package lif + +import "unsafe" + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x1a + + sysSOCK_DGRAM = 0x1 +) + +type sockaddrStorage struct { + Family uint16 + X_ss_pad1 [6]int8 + X_ss_align float64 + X_ss_pad2 [240]int8 +} + +const ( + sysLIFC_NOXMIT = 0x1 + sysLIFC_EXTERNAL_SOURCE = 0x2 + sysLIFC_TEMPORARY = 0x4 + sysLIFC_ALLZONES = 0x8 + sysLIFC_UNDER_IPMP = 0x10 + sysLIFC_ENABLED = 0x20 + + sysSIOCGLIFADDR = -0x3f87968f + sysSIOCGLIFDSTADDR = -0x3f87968d + sysSIOCGLIFFLAGS = -0x3f87968b + sysSIOCGLIFMTU = -0x3f879686 + sysSIOCGLIFNETMASK = -0x3f879683 + sysSIOCGLIFMETRIC = -0x3f879681 + sysSIOCGLIFNUM = -0x3ff3967e + sysSIOCGLIFINDEX = -0x3f87967b + sysSIOCGLIFSUBNET = -0x3f879676 + sysSIOCGLIFLNKINFO = -0x3f879674 + sysSIOCGLIFCONF = -0x3fef965b + sysSIOCGLIFHWADDR = -0x3f879640 +) + +const ( + sysIFF_UP = 0x1 + sysIFF_BROADCAST = 0x2 + sysIFF_DEBUG = 0x4 + sysIFF_LOOPBACK = 0x8 + sysIFF_POINTOPOINT = 0x10 + sysIFF_NOTRAILERS = 0x20 + sysIFF_RUNNING = 0x40 + sysIFF_NOARP = 0x80 + sysIFF_PROMISC = 0x100 + sysIFF_ALLMULTI = 0x200 + sysIFF_INTELLIGENT = 0x400 + sysIFF_MULTICAST = 0x800 + sysIFF_MULTI_BCAST = 0x1000 + sysIFF_UNNUMBERED = 0x2000 + sysIFF_PRIVATE = 0x8000 +) + +const ( + sizeofLifnum = 0xc + sizeofLifreq = 0x178 + sizeofLifconf = 0x18 + sizeofLifIfinfoReq = 0x10 +) + +type lifnum struct { + Family uint16 + Flags int32 + Count int32 +} + +type lifreq struct { + Name [32]int8 + Lifru1 [4]byte + Type uint32 + Lifru [336]byte +} + +type lifconf struct { + Family uint16 + Flags int32 + Len int32 + Lifcu [unsafe.Sizeof(unsafe.Pointer(nil))]byte +} + +type lifIfinfoReq struct { + Maxhops uint8 + Reachtime uint32 + Reachretrans uint32 + Maxmtu uint32 +} + +const ( + sysIFT_IPV4 = 0xc8 + sysIFT_IPV6 = 0xc9 + sysIFT_6TO4 = 0xca +) Index: libgo/go/golang.org/x/net/lif/zsys_solaris_amd64.go =================================================================== --- libgo/go/golang.org/x/net/lif/zsys_solaris_amd64.go (revision 275594) +++ libgo/go/golang.org/x/net/lif/zsys_solaris_amd64.go (nonexistent) @@ -1,103 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_solaris.go - -package lif - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x1a - - sysSOCK_DGRAM = 0x1 -) - -type sockaddrStorage struct { - Family uint16 - X_ss_pad1 [6]int8 - X_ss_align float64 - X_ss_pad2 [240]int8 -} - -const ( - sysLIFC_NOXMIT = 0x1 - sysLIFC_EXTERNAL_SOURCE = 0x2 - sysLIFC_TEMPORARY = 0x4 - sysLIFC_ALLZONES = 0x8 - sysLIFC_UNDER_IPMP = 0x10 - sysLIFC_ENABLED = 0x20 - - sysSIOCGLIFADDR = -0x3f87968f - sysSIOCGLIFDSTADDR = -0x3f87968d - sysSIOCGLIFFLAGS = -0x3f87968b - sysSIOCGLIFMTU = -0x3f879686 - sysSIOCGLIFNETMASK = -0x3f879683 - sysSIOCGLIFMETRIC = -0x3f879681 - sysSIOCGLIFNUM = -0x3ff3967e - sysSIOCGLIFINDEX = -0x3f87967b - sysSIOCGLIFSUBNET = -0x3f879676 - sysSIOCGLIFLNKINFO = -0x3f879674 - sysSIOCGLIFCONF = -0x3fef965b - sysSIOCGLIFHWADDR = -0x3f879640 -) - -const ( - sysIFF_UP = 0x1 - sysIFF_BROADCAST = 0x2 - sysIFF_DEBUG = 0x4 - sysIFF_LOOPBACK = 0x8 - sysIFF_POINTOPOINT = 0x10 - sysIFF_NOTRAILERS = 0x20 - sysIFF_RUNNING = 0x40 - sysIFF_NOARP = 0x80 - sysIFF_PROMISC = 0x100 - sysIFF_ALLMULTI = 0x200 - sysIFF_INTELLIGENT = 0x400 - sysIFF_MULTICAST = 0x800 - sysIFF_MULTI_BCAST = 0x1000 - sysIFF_UNNUMBERED = 0x2000 - sysIFF_PRIVATE = 0x8000 -) - -const ( - sizeofLifnum = 0xc - sizeofLifreq = 0x178 - sizeofLifconf = 0x18 - sizeofLifIfinfoReq = 0x10 -) - -type lifnum struct { - Family uint16 - Pad_cgo_0 [2]byte - Flags int32 - Count int32 -} - -type lifreq struct { - Name [32]int8 - Lifru1 [4]byte - Type uint32 - Lifru [336]byte -} - -type lifconf struct { - Family uint16 - Pad_cgo_0 [2]byte - Flags int32 - Len int32 - Pad_cgo_1 [4]byte - Lifcu [8]byte -} - -type lifIfinfoReq struct { - Maxhops uint8 - Pad_cgo_0 [3]byte - Reachtime uint32 - Reachretrans uint32 - Maxmtu uint32 -} - -const ( - sysIFT_IPV4 = 0xc8 - sysIFT_IPV6 = 0xc9 - sysIFT_6TO4 = 0xca -) Index: libgo/go/golang.org/x/sys/cpu/cpu_aix_ppc64.go =================================================================== --- libgo/go/golang.org/x/sys/cpu/cpu_aix_ppc64.go (revision 275594) +++ libgo/go/golang.org/x/sys/cpu/cpu_aix_ppc64.go (working copy) @@ -6,8 +6,6 @@ package cpu -const cacheLineSize = 128 - const ( // getsystemcfg constants _SC_IMPL = 2 Index: libgo/go/golang.org/x/sys/cpu/cpu_arm.go =================================================================== --- libgo/go/golang.org/x/sys/cpu/cpu_arm.go (revision 275594) +++ libgo/go/golang.org/x/sys/cpu/cpu_arm.go (nonexistent) @@ -1,9 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cpu - -const cacheLineSize = 32 - -func doinit() {} Index: libgo/go/golang.org/x/sys/cpu/cpu_linux_arm64.go =================================================================== --- libgo/go/golang.org/x/sys/cpu/cpu_linux_arm64.go (revision 275594) +++ libgo/go/golang.org/x/sys/cpu/cpu_linux_arm64.go (working copy) @@ -4,8 +4,6 @@ package cpu -const cacheLineSize = 64 - // HWCAP/HWCAP2 bits. These are exposed by Linux. const ( hwcap_FP = 1 << 0 Index: libgo/go/golang.org/x/sys/cpu/cpu_linux_ppc64x.go =================================================================== --- libgo/go/golang.org/x/sys/cpu/cpu_linux_ppc64x.go (revision 275594) +++ libgo/go/golang.org/x/sys/cpu/cpu_linux_ppc64x.go (working copy) @@ -7,8 +7,6 @@ package cpu -const cacheLineSize = 128 - // HWCAP/HWCAP2 bits. These are exposed by the kernel. const ( // ISA Level Index: libgo/go/golang.org/x/sys/cpu/cpu_linux_s390x.go =================================================================== --- libgo/go/golang.org/x/sys/cpu/cpu_linux_s390x.go (revision 275594) +++ libgo/go/golang.org/x/sys/cpu/cpu_linux_s390x.go (working copy) @@ -4,8 +4,6 @@ package cpu -const cacheLineSize = 256 - const ( // bit mask values from /usr/include/bits/hwcap.h hwcap_ZARCH = 2 Index: libgo/go/golang.org/x/sys/cpu/cpu_mips64x.go =================================================================== --- libgo/go/golang.org/x/sys/cpu/cpu_mips64x.go (revision 275594) +++ libgo/go/golang.org/x/sys/cpu/cpu_mips64x.go (nonexistent) @@ -1,11 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build mips64 mips64le - -package cpu - -const cacheLineSize = 32 - -func doinit() {} Index: libgo/go/golang.org/x/sys/cpu/cpu_mipsx.go =================================================================== --- libgo/go/golang.org/x/sys/cpu/cpu_mipsx.go (revision 275594) +++ libgo/go/golang.org/x/sys/cpu/cpu_mipsx.go (nonexistent) @@ -1,11 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build mips mipsle - -package cpu - -const cacheLineSize = 32 - -func doinit() {} Index: libgo/go/golang.org/x/sys/cpu/cpu_other_arm64.go =================================================================== --- libgo/go/golang.org/x/sys/cpu/cpu_other_arm64.go (revision 275594) +++ libgo/go/golang.org/x/sys/cpu/cpu_other_arm64.go (nonexistent) @@ -1,11 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !linux,arm64 - -package cpu - -const cacheLineSize = 64 - -func doinit() {} Index: libgo/go/golang.org/x/sys/cpu/cpu_wasm.go =================================================================== --- libgo/go/golang.org/x/sys/cpu/cpu_wasm.go (revision 275594) +++ libgo/go/golang.org/x/sys/cpu/cpu_wasm.go (nonexistent) @@ -1,15 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build wasm - -package cpu - -// We're compiling the cpu package for an unknown (software-abstracted) CPU. -// Make CacheLinePad an empty struct and hope that the usual struct alignment -// rules are good enough. - -const cacheLineSize = 0 - -func doinit() {} Index: libgo/go/golang.org/x/sys/cpu/cpu_x86.go =================================================================== --- libgo/go/golang.org/x/sys/cpu/cpu_x86.go (revision 275594) +++ libgo/go/golang.org/x/sys/cpu/cpu_x86.go (working copy) @@ -6,8 +6,6 @@ package cpu -const cacheLineSize = 64 - func init() { Initialized = true Index: libgo/go/runtime/os_solaris.go =================================================================== --- libgo/go/runtime/os_solaris.go (revision 275594) +++ libgo/go/runtime/os_solaris.go (working copy) @@ -31,7 +31,7 @@ func sem_reltimedwait_np(sem *semt, time //go:nosplit func semacreate(mp *m) { - if mp.mos.waitsema != 0 { + if mp.waitsema != 0 { return } @@ -44,7 +44,7 @@ func semacreate(mp *m) { if sem_init(sem, 0, 0) != 0 { throw("sem_init") } - mp.mos.waitsema = uintptr(unsafe.Pointer(sem)) + mp.waitsema = uintptr(unsafe.Pointer(sem)) } //go:nosplit @@ -54,7 +54,7 @@ func semasleep(ns int64) int32 { var ts timespec ts.setNsec(ns) - if sem_reltimedwait_np((*semt)(unsafe.Pointer(_m_.mos.waitsema)), &ts) != 0 { + if sem_reltimedwait_np((*semt)(unsafe.Pointer(_m_.waitsema)), &ts) != 0 { err := errno() if err == _ETIMEDOUT || err == _EAGAIN || err == _EINTR { return -1 @@ -64,7 +64,7 @@ func semasleep(ns int64) int32 { return 0 } for { - r1 := sem_wait((*semt)(unsafe.Pointer(_m_.mos.waitsema))) + r1 := sem_wait((*semt)(unsafe.Pointer(_m_.waitsema))) if r1 == 0 { break } @@ -78,7 +78,7 @@ func semasleep(ns int64) int32 { //go:nosplit func semawakeup(mp *m) { - if sem_post((*semt)(unsafe.Pointer(mp.mos.waitsema))) != 0 { + if sem_post((*semt)(unsafe.Pointer(mp.waitsema))) != 0 { throw("sem_post") } }