On 1/2/21 12:11 AM, Ian Lance Taylor wrote:
> On Thu, Dec 31, 2020 at 7:40 AM Matthias Klose <d...@ubuntu.com> wrote:
>>
>> On 12/31/20 12:14 AM, Ian Lance Taylor via Gcc-patches wrote:
>>> I've committed a patch to update libgo to the Go 1.16beta1 release.
>>>
>>> This patch does not include support for the new //go:embed directive
>>> that will be available in Go 1.16.1 (https://golang.org/issue/41191)
>>> Support for that requires compiler changes, which will come later.
>>>
>>> As usual with these big updates, I have not included the complete
>>> changes in this e-mail message, only changes that are gccgo-specific.
>>>
>>> Testing this requires some changes to gotools.
>>>
>>> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
>>> to mainline.
>>
>> also breaks the s390x 32bit multilib build (s390).
>>
>> ../../../../src/libgo/go/internal/cpu/cpu.go:123:9: error: reference to
>> undefined name 'doinit'
>>   123 |         doinit()
>>       |         ^
> 
> The problems building the internal/cpu and golang.org/x/sys/cpu
> packages on less common architectures should be fixed by this patch.
> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
> to mainline.

still ftbfs on power*, tested with a multilib build on powerpc64-linux-gnu.
patch attached, didn't check on aix.

../../../src/libgo/go/internal/cpu/cpu.go:123:9: error: reference to undefined
name 'doinit'
  123 |         doinit()
      |         ^


../../../src/libgo/go/internal/cpu/cpu_ppc64x_linux.go:26:26: error: reference
to undefined name 'isSet'
   26 |         PPC64.IsPOWER9 = isSet(HWCap2, hwcap2_ARCH_3_00)
      |                          ^
../../../src/libgo/go/internal/cpu/cpu_ppc64x_linux.go:27:25: error: reference
to undefined name 'isSet'
   27 |         PPC64.HasDARN = isSet(HWCap2, hwcap2_DARN)
      |                         ^
../../../src/libgo/go/internal/cpu/cpu_ppc64x_linux.go:28:24: error: reference
to undefined name 'isSet'
   28 |         PPC64.HasSCV = isSet(HWCap2, hwcap2_SCV)
      |                        ^


Matthias
--- a/libgo/go/internal/cpu/cpu_ppc64x_aix.go
+++ b/libgo/go/internal/cpu/cpu_ppc64x_aix.go
@@ -12,10 +12,14 @@ const (
 	_IMPL_POWER9 = 0x20000
 )
 
-func osinit() {
+func doinit() {
 	impl := getsystemcfg(_SC_IMPL)
 	PPC64.IsPOWER9 = isSet(impl, _IMPL_POWER9)
 }
 
+func isSet(hwc uint, value uint) bool {
+        return hwc&value != 0
+}
+
 // getsystemcfg is defined in runtime/os2_aix.go
 func getsystemcfg(label uint) uint
--- a/libgo/go/internal/cpu/cpu_ppc64x_linux.go
+++ b/libgo/go/internal/cpu/cpu_ppc64x_linux.go
@@ -22,8 +22,12 @@ const (
 	hwcap2_SCV  = 0x00100000
 )
 
-func osinit() {
+func doinit() {
 	PPC64.IsPOWER9 = isSet(HWCap2, hwcap2_ARCH_3_00)
 	PPC64.HasDARN = isSet(HWCap2, hwcap2_DARN)
 	PPC64.HasSCV = isSet(HWCap2, hwcap2_SCV)
 }
+
+func isSet(hwc uint, value uint) bool {
+        return hwc&value != 0
+}

Reply via email to