On 12/31/20 11:36 AM, Matthias Klose wrote:
> On 12/31/20 11:12 AM, Andreas Schwab wrote:
>> I'm getting this error in ia64:
>>
>> ../../../libgo/go/internal/cpu/cpu.go:123:9: error: reference to undefined 
>> name 'doinit'
>>   123 |         doinit()
>>       |         ^
>> make[4]: *** [internal/cpu.lo] Error 1
>>
>> Andreas.
>>
> 
> also on x32, or with the x32 multilib target.

fixed for x32 with the attached patch

Matthias
--- a/libgo/go/internal/cpu/cpu_no_name.go
+++ b/libgo/go/internal/cpu/cpu_no_name.go
@@ -4,6 +4,7 @@
 
 // +build !386
 // +build !amd64
+// +build !amd64p32
 
 package cpu
 
--- a/libgo/go/internal/cpu/cpu_x86.go
+++ b/libgo/go/internal/cpu/cpu_x86.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 386 amd64
+// +build 386 amd64 amd64p32
 
 package cpu
 
@@ -56,7 +56,7 @@ func doinit() {
 		{Name: "ssse3", Feature: &X86.HasSSSE3},
 
 		// These capabilities should always be enabled on amd64:
-		{Name: "sse2", Feature: &X86.HasSSE2, Required: GOARCH == "amd64"},
+		{Name: "sse2", Feature: &X86.HasSSE2, Required: GOARCH == "amd64" || GOARCH == "amd64p32"},
 	}
 
 	maxID, _, _, _ := cpuid(0, 0)
--- /dev/null
+++ b/libgo/go/internal/cpu/cpu_amd64p32.go
@@ -0,0 +1,7 @@
+// Copyright 2020 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 GOARCH = "amd64p32"

Reply via email to