Am 2022-06-21 um 09:34 schrieb Sören Tempel via Gcc-patches:
Hi,

The problem is: glibc defines loff_t in sys/types.h, not fcntl.h (where musl
defines it). I falsely assumed that the newly committed AC_CHECK_TYPES
invocation would include fcntl.h *in addition to* AC_INCLUDES_DEFAULT.
However, as it turns out specifying includes for AC_CHECK_TYPES overwrites the
default instead of appending to it.

The patch below should fix this by appending to AC_INCLUDES_DEFAULT explicitly.
Alternatively, we could try to add fcntl.h to AC_INCLUDES_DEFAULT, though my
autotools knowledge is severely limited and hence I am not sure how this would
be achieved.

diff --git a/libgo/configure b/libgo/configure
index b7ff9b3..273af1d 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -15549,8 +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" "
+$ac_includes_default
+#include <fcntl.h>
+ "
  if test "x$ac_cv_type_loff_t" = xyes; then :

  cat >>confdefs.h <<_ACEOF
diff --git a/libgo/configure.ac b/libgo/configure.ac
index bac58b0..b237392 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -604,7 +604,9 @@ AC_TYPE_OFF_T

  CFLAGS_hold="$CFLAGS"
  CFLAGS="$OSCFLAGS $CFLAGS"
-AC_CHECK_TYPES([loff_t], [], [], [[#include <fcntl.h>]])
+AC_CHECK_TYPES([loff_t], [], [], [
+AC_INCLUDES_DEFAULT
+#include <fcntl.h>])
  CFLAGS="$CFLAGS_hold"

  LIBS_hold="$LIBS"


Hi,

the patch restores bootstrap for me on x86_64-suse-linux.

Franz.

Reply via email to