aboutsummaryrefslogtreecommitdiff
path: root/libgo/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-06-14 11:33:42 -0700
committerIan Lance Taylor <iant@golang.org>2022-06-17 14:27:06 -0700
commit7f195a2270910a6ed08bd76e3a16b0a6503f9faf (patch)
tree053387a6fe016bd4420765eb3c45415787fae6f7 /libgo/configure
parenta284fadcce8ef443cc3cc047a8017745efb51758 (diff)
downloadgcc-7f195a2270910a6ed08bd76e3a16b0a6503f9faf.zip
gcc-7f195a2270910a6ed08bd76e3a16b0a6503f9faf.tar.gz
gcc-7f195a2270910a6ed08bd76e3a16b0a6503f9faf.tar.bz2
libgo: permit loff_t and off_t to be macros
They are macros in musl libc, rather than typedefs, and -fgo-dump-spec doesn't handle that case. Based on patch by Sören Tempel. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/412075
Diffstat (limited to 'libgo/configure')
-rwxr-xr-xlibgo/configure9
1 files changed, 7 insertions, 2 deletions
diff --git a/libgo/configure b/libgo/configure
index ffe17c9..b7ff9b3 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -15249,7 +15249,7 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
fi
-for ac_header in port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h
+for ac_header in fcntl.h port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -15546,7 +15546,11 @@ _ACEOF
fi
-ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "$ac_includes_default"
+
+CFLAGS_hold="$CFLAGS"
+CFLAGS="$OSCFLAGS $CFLAGS"
+ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "#include <fcntl.h>
+"
if test "x$ac_cv_type_loff_t" = xyes; then :
cat >>confdefs.h <<_ACEOF
@@ -15556,6 +15560,7 @@ _ACEOF
fi
+CFLAGS="$CFLAGS_hold"
LIBS_hold="$LIBS"
LIBS="$LIBS -lm"