summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-09 04:32:08 +0000
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-09 04:32:08 +0000
commit55b8da6f0ad7d995cf85ef94fc4df99ba6f24ce0 (patch)
tree65bf1dc69bb09c998e2a2e820d57c08b54ba56d6 /libiberty
parentc59881a73d39952a7e596f14e43df024304f2167 (diff)
downloadgcc-55b8da6f0ad7d995cf85ef94fc4df99ba6f24ce0.tar.gz
Configury changes for obstack optimization
* configure.ac: Check size of size_t. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229990 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rwxr-xr-xlibiberty/configure58
-rw-r--r--libiberty/configure.ac1
3 files changed, 64 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 7821e70e57a..d0b1e8bcf7b 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,5 +1,10 @@
2015-11-09 Alan Modra <amodra@gmail.com>
+ * configure.ac: Check size of size_t.
+ * configure: Regenerate.
+
+2015-11-09 Alan Modra <amodra@gmail.com>
+
* obstack.c (_obstack_newchunk): Silence -Wc++compat warning.
(_obstack_begin_worker): Likewise. Move assignment to h->chunk
after alloc failure check.
diff --git a/libiberty/configure b/libiberty/configure
index a40ae708797..bde78ffd25d 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -4389,6 +4389,12 @@ fi
ac_c_preproc_warn_flag=yes
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
ac_libiberty_warn_cflags=
save_CFLAGS="$CFLAGS"
for real_option in -W -Wall -Wwrite-strings -Wc++-compat \
@@ -4434,6 +4440,18 @@ $as_echo "$ac_res" >&6; }
fi
done
CFLAGS="$save_CFLAGS"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Do the check with the no- prefix removed from the warning options
# since gcc silently accepts any -Wno-* option on purpose
@@ -4471,6 +4489,12 @@ if test $acx_cv_prog_cc_pedantic_ = yes; then :
fi
fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test "x$CC" != xcc; then
@@ -5381,6 +5405,40 @@ cat >>confdefs.h <<_ACEOF
_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 size_t" >&5
+$as_echo_n "checking size of size_t... " >&6; }
+if test "${ac_cv_sizeof_size_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_size_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_set_status 77
+as_fn_error "cannot compute sizeof (size_t)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_size_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
+$as_echo "$ac_cv_sizeof_size_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+_ACEOF
+
+
# Check for presense of long long
ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index e21e3aa5809..9d3f2988d5d 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -276,6 +276,7 @@ libiberty_AC_DECLARE_ERRNO
# Determine sizes of some types.
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long])
+AC_CHECK_SIZEOF([size_t])
# Check for presense of long long
AC_CHECK_TYPE([long long],