[Go] Make -intgosize optional

We no longer support Go < 1.2 so we can default intgo to ptrdiff_t
and uintgo to size_t.

Fixes #683
Fixes #2233
This commit is contained in:
Olly Betts 2022-03-16 09:41:11 +13:00
commit 2da3815f99
5 changed files with 9 additions and 27 deletions

View file

@ -2482,18 +2482,9 @@ else
go1.[012]*)
AC_MSG_RESULT([yes - minimum version is 1.3])
GO=
GOOPT="-intgosize 32"
;;
*)
AC_MSG_RESULT([no])
case "$(go env GOARCH)" in
amd64 | arm64 | ppc64*)
GOOPT="-intgosize 64"
;;
*)
GOOPT="-intgosize 32"
;;
esac
;;
esac
fi
@ -2514,13 +2505,6 @@ else
AC_MSG_RESULT([no])
if test "$go_version" -lt 480; then
GCCGOOPT="-intgosize 32"
else
AC_CHECK_SIZEOF([void *], [4])
if test "$ac_cv_sizeof_void_p" = "8"; then
GCCGOOPT="-intgosize 64"
else
GCCGOOPT="-intgosize 32"
fi
fi
fi
fi