On Sat, Jun 18, 2022 at 8:59 AM Andreas Schwab <sch...@linux-m68k.org> wrote: > > On Jun 18 2022, Ian Lance Taylor wrote: > > > What target? > > aarch64-suse-linux, of course.
Thanks. Sorry for missing that. > > What is the output of > > > > grep loff_t TARGET/libgo/gen-sysinfo.go > > type ___loff_t int64 > type _loff_t int64 > type ___kernel_loff_t int64 Hmmm, it does work as expected on gcc114 in the GCC compile farm, which seems to be Linux 3.13 and glibc 4.8.4. On that system I see > grep loff_t aarch64-unknown-linux-gnu/libgo/gen-sysinfo.go type ___loff_t int64 type _loff_t int64 type ___kernel_loff_t int64 type _libgo_loff_t_type int64 Still, I may see the problem. I've committed this patch that should fix it. Ian
7afe467c665bba27574a183dad5c00f2c0f676e1 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 4b75dd37355..737bc483274 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -a409e049737ec9a358a19233e017d957db3d6d2a +77821de1a149c2e6ef9c154ae384c16292173039 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/configure b/libgo/configure index b7ff9b32867..61a49947eb9 100755 --- a/libgo/configure +++ b/libgo/configure @@ -15549,7 +15549,10 @@ fi CFLAGS_hold="$CFLAGS" CFLAGS="$OSCFLAGS $CFLAGS" -ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "#include <fcntl.h> +ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" " +#include <sys/types.h> +#include <fcntl.h> + " if test "x$ac_cv_type_loff_t" = xyes; then : diff --git a/libgo/configure.ac b/libgo/configure.ac index bac58b07b41..274fcfc35c7 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -604,7 +604,10 @@ AC_TYPE_OFF_T CFLAGS_hold="$CFLAGS" CFLAGS="$OSCFLAGS $CFLAGS" -AC_CHECK_TYPES([loff_t], [], [], [[#include <fcntl.h>]]) +AC_CHECK_TYPES([loff_t], [], [], [[ +#include <sys/types.h> +#include <fcntl.h> +]]) CFLAGS="$CFLAGS_hold" LIBS_hold="$LIBS"