aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-11-09 15:17:05 +1030
committerAlan Modra <amodra@gmail.com>2015-11-09 15:21:50 +1030
commitc20a0642333655311b1f5b6f78adfeb8ec9fe1d4 (patch)
tree277930644bab110ac76327044a69abe6974b30c0 /libiberty
parent78d14d2b9325fb4d25034eccf5650ef967d19640 (diff)
downloadgdb-c20a0642333655311b1f5b6f78adfeb8ec9fe1d4.zip
gdb-c20a0642333655311b1f5b6f78adfeb8ec9fe1d4.tar.gz
gdb-c20a0642333655311b1f5b6f78adfeb8ec9fe1d4.tar.bz2
Configury changes for obstack optimization
Provides defines used to determine whether glibc obstacks are compatible. Generally speaking, 32-bit targets won't need to use obstack.o from libiberty if glibc is used, while 64-bit targets will, until glibc gets the new obstack code. libiberty/ * configure.ac: Get size of size_t. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/config.in3
-rwxr-xr-xlibiberty/configure34
-rw-r--r--libiberty/configure.ac1
4 files changed, 44 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 6d3b295..3b360a5 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,5 +1,11 @@
2015-11-09 Alan Modra <amodra@gmail.com>
+ * configure.ac: Check size of size_t.
+ * configure: Regenerate.
+ * config.in: 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/config.in b/libiberty/config.in
index 0dedbf0..1ff50c6 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -470,6 +470,9 @@
/* The size of `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
+/* The size of `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
+
/* Define if you know the direction of stack growth for your system; otherwise
it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows
toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses
diff --git a/libiberty/configure b/libiberty/configure
index 720dc5e..bde78ff 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -5405,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 e21e3aa..9d3f298 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],