Commit 44ef0300 by Ian Lance Taylor

libgo: support x32 as GOARCH=amd64p32 GOOS=linux

    
    This is enough to let libgo build when configured using
    --with-multilib-list=m64,m32,mx32.  I don't have an x32-enabled kernel
    so I haven't tested whether it executes correctly.
    
    For https://gcc.gnu.org/PR87470
    
    Reviewed-on: https://go-review.googlesource.com/138817

From-SVN: r264772
parent 1b282533
013a9e68c9a31f888733d46182d19f9e5d956f27
2f56d51c6b3104242613c74b02fa6c63a2fe16c5
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
......@@ -13685,7 +13685,19 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
GOARCH=386
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __ILP32__
#error x32
#endif
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
GOARCH=amd64
else
GOARCH=amd64p32
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
;;
......
......@@ -252,8 +252,13 @@ changequote([,])dnl
#ifdef __x86_64__
#error 64-bit
#endif],
[GOARCH=386],
[GOARCH=amd64])
[GOARCH=386],
AC_COMPILE_IFELSE([
#ifdef __ILP32__
#error x32
#endif],
[GOARCH=amd64],
[GOARCH=amd64p32]))
;;
ia64-*-*)
GOARCH=ia64
......
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package crc32
import "internal/cpu"
......
// 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 unix
// Linux getrandom system call number.
// See GetRandom in getrandom_linux.go.
const randomTrap uintptr = 0x40000000 + 318
......@@ -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 arm nacl armbe m68k mips mipsle mips64p32 mips64p32le nios2 ppc s390 sh shbe sparc
// +build 386 amd64p32 arm nacl armbe m68k mips mipsle mips64p32 mips64p32le nios2 ppc s390 sh shbe sparc
package runtime
......
......@@ -57,10 +57,15 @@ case $goarch in
defaultphyspagesize=8192
pcquantum=4
;;
amd64 | amd64p32)
amd64)
family=AMD64
hugepagesize="1 << 21"
;;
amd64p32)
family=AMD64
hugepagesize="1 << 21"
ptrsize=4
;;
arm | armbe)
family=ARM
cachelinesize=32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment