Configury changes for obstack optimization
authorAlan Modra <amodra@gmail.com>
Mon, 9 Nov 2015 04:47:05 +0000 (15:17 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 9 Nov 2015 04:51:50 +0000 (15:21 +1030)
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.

libiberty/ChangeLog
libiberty/config.in
libiberty/configure
libiberty/configure.ac

index 6d3b2950fc21f3052a5f66ad455db239d0a7f307..3b360a5c72f53da8816c23d509ba18ebc1273830 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 0dedbf08e0ffce7f49dcb6c7fc5fe78a4845f40d..1ff50c67f600a6399f40c69ca942d89d5c3a83a3 100644 (file)
 /* 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
index 720dc5e80beb936f3d08d593955727ca13e34f4d..bde78ffd25db650445a3a0bbe0b03e79efb786cb 100755 (executable)
@@ -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"
index e21e3aa5809b12f0616d376c69608fc5c941dbd4..9d3f2988d5d240d95a2bdc3829e8837efcc6b898 100644 (file)
@@ -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],
This page took 0.031265 seconds and 4 git commands to generate.