aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure
diff options
context:
space:
mode:
authorClément Chigot <clement.chigot@atos.net>2021-05-06 16:08:15 +0200
committerClément Chigot <clement.chigot@atos.net>2022-01-12 16:59:47 +0100
commit14e0d8329750776a1807626867f87dacc102f9ed (patch)
tree00e766cd37adf3fed25f88ea34bebfd9981aa488 /gcc/configure
parent75845d584f490c294d40908168e5721adc38145d (diff)
downloadgcc-14e0d8329750776a1807626867f87dacc102f9ed.zip
gcc-14e0d8329750776a1807626867f87dacc102f9ed.tar.gz
gcc-14e0d8329750776a1807626867f87dacc102f9ed.tar.bz2
aix: handle 64bit inodes for include directories
On AIX, stat will store inodes in 32bit even when using LARGE_FILES. If the inode is larger, it will return -1 in st_ino. Thus, in incpath.c when comparing include directories, if several of them have 64bit inodes, they will be considered as duplicated. gcc/ChangeLog: 2022-01-12 Clément Chigot <clement.chigot@atos.net> * configure.ac: Check sizeof ino_t and dev_t. (HOST_STAT_FOR_64BIT_INODES): New AC_DEFINE to provide stat syscall being able to handle 64bit inodes. * config.in: Regenerate. * configure: Regenerate. * incpath.c (HOST_STAT_FOR_64BIT_INODES): New define. (remove_duplicates): Use it. libcpp/ChangeLog: 2022-01-12 Clément Chigot <clement.chigot@atos.net> * configure.ac: Check sizeof ino_t and dev_t. * config.in: Regenerate. * configure: Regenerate. * include/cpplib.h (INO_T_CPP): Change for AIX. (DEV_T_CPP): New macro. (struct cpp_dir): Use it.
Diffstat (limited to 'gcc/configure')
-rwxr-xr-xgcc/configure83
1 files changed, 81 insertions, 2 deletions
diff --git a/gcc/configure b/gcc/configure
index 992a9d7..d19059e 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -6302,6 +6302,85 @@ rm -rf conftest*
fi
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of ino_t" >&5
+$as_echo_n "checking size of ino_t... " >&6; }
+if ${ac_cv_sizeof_ino_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (ino_t))" "ac_cv_sizeof_ino_t" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_ino_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (ino_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_ino_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ino_t" >&5
+$as_echo "$ac_cv_sizeof_ino_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INO_T $ac_cv_sizeof_ino_t
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of dev_t" >&5
+$as_echo_n "checking size of dev_t... " >&6; }
+if ${ac_cv_sizeof_dev_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (dev_t))" "ac_cv_sizeof_dev_t" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_dev_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (dev_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_dev_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_dev_t" >&5
+$as_echo "$ac_cv_sizeof_dev_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_DEV_T $ac_cv_sizeof_dev_t
+_ACEOF
+
+
+
+# Select the right stat being able to handle 64bit inodes, if needed.
+if test "$enable_largefile" != no; then
+ case "$host, $build" in
+ *-*-aix*,*|*,*-*-aix*)
+ if test "$ac_cv_sizeof_ino_t" == "4" -a "$ac_cv_sizeof_dev_t" == 4; then
+
+$as_echo "#define HOST_STAT_FOR_64BIT_INODES stat64x" >>confdefs.h
+
+ fi;;
+ esac
+fi
+
# sizeof(char) is 1 by definition.
# The cast to long int works around a bug in the HP C Compiler
@@ -19561,7 +19640,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19564 "configure"
+#line 19643 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19667,7 +19746,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19670 "configure"
+#line 19749 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H