* as.c (main): Only use sbrk when HAVE_SBRK defined.

* configure.in:  Add test for sbrk.
	* configure:  Regenerate using autoconf 2.4.
This commit is contained in:
Fred Fish 1995-07-05 08:04:28 +00:00
parent eac6290c7e
commit e63c594dd0
4 changed files with 92 additions and 21 deletions

View File

@ -1,3 +1,9 @@
Wed Jul 5 00:59:22 1995 Fred Fish (fnf@cygnus.com)
* as.c (main): Only use sbrk when HAVE_SBRK defined.
* configure.in: Add test for sbrk.
* configure: Regenerate using autoconf 2.4.
Mon Jul 3 15:58:16 1995 Jeff Law (law@snake.cs.utah.edu)
* config/tc-hppa.h (MAX_RELOC_EXPANSION): Bump to 6.

View File

@ -324,9 +324,12 @@ parse_args (pargc, pargv)
exit (EXIT_SUCCESS);
case OPTION_EMULATION:
/* Already handled; ignore it this time, except error checking. */
#ifdef USE_EMULATIONS
if (strcmp (optarg, this_emulation->name))
as_fatal ("multiple emulation names specified");
#else
as_fatal ("emulations not handled in this configuration");
#endif
break;
case OPTION_DUMPCONFIG:
@ -537,13 +540,17 @@ main (argc, argv)
if (flag_print_statistics)
{
extern char **environ;
#ifdef HAVE_SBRK
char *lim = (char *) sbrk (0);
#endif
long run_time = get_run_time () - start_time;
fprintf (stderr, "%s: total time in assembly: %ld.%06ld\n",
myname, run_time / 1000000, run_time % 1000000);
#ifdef HAVE_SBRK
fprintf (stderr, "%s: data size %ld\n",
myname, (long) (lim - (char *) &environ));
#endif
}
/* Use exit instead of return, because under VMS environments they

95
gas/configure vendored
View File

@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.3
# Generated automatically using autoconf version 2.4
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@ -220,7 +220,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.3"
echo "configure generated by autoconf version 2.4"
exit 0 ;;
-with-* | --with-*)
@ -707,8 +707,8 @@ for this_target in $target $canon_targets ; do
i386-*-msdos*) fmt=aout ;;
i386-*-moss*) fmt=elf ;;
i386-*-pe) fmt=coff targ=i386coff em=pe ;;
i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
i386-*-win32) fmt=coff targ=i386coff em=pe ;;
i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
i960-*-bout) fmt=bout ;;
i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
i960-*-nindy*) fmt=bout ;;
@ -1227,7 +1227,7 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1229 "configure"
#line 1231 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
@ -1241,7 +1241,7 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1243 "configure"
#line 1245 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
@ -1260,8 +1260,10 @@ fi
rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
else
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
echo "$ac_t""$CPP" 1>&6
for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
@ -1272,7 +1274,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1274 "configure"
#line 1278 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
@ -1324,7 +1326,7 @@ else
ac_cv_c_cross=yes
else
cat > conftest.$ac_ext <<EOF
#line 1326 "configure"
#line 1330 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
@ -1347,7 +1349,7 @@ if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1349 "configure"
#line 1353 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() { return 0; }
@ -1378,7 +1380,7 @@ if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1380 "configure"
#line 1384 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@ -1436,7 +1438,7 @@ if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1438 "configure"
#line 1442 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@ -1464,7 +1466,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1466 "configure"
#line 1470 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1518,7 +1520,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
#line 1520 "configure"
#line 1524 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@ -1560,7 +1562,7 @@ else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
#line 1562 "configure"
#line 1566 "configure"
#include "confdefs.h"
int main() { return 0; }
@ -1599,7 +1601,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1601 "configure"
#line 1605 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1644,6 +1646,59 @@ fi
done
# Some systems don't have sbrk().
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1658 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
char $ac_func();
int main() { return 0; }
int t() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if eval $ac_link; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
# Some non-ANSI preprocessors botch requoting inside strings. That's bad
# enough, but on some of those systems, the assert macro relies on requoting
# working properly!
@ -1652,7 +1707,7 @@ if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1654 "configure"
#line 1711 "configure"
#include "confdefs.h"
#include <assert.h>
#include <stdio.h>
@ -1709,7 +1764,7 @@ if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1711 "configure"
#line 1768 "configure"
#include "confdefs.h"
$gas_test_headers
int main() { return 0; }
@ -1745,7 +1800,7 @@ if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1747 "configure"
#line 1804 "configure"
#include "confdefs.h"
$gas_test_headers
int main() { return 0; }
@ -1784,7 +1839,7 @@ if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1786 "configure"
#line 1843 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
@ -1898,7 +1953,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.3"
echo "$CONFIG_STATUS generated by autoconf version 2.4"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;

View File

@ -533,6 +533,9 @@ AC_C_INLINE
# VMS doesn't have unlink.
AC_CHECK_FUNCS(unlink remove, break)
# Some systems don't have sbrk().
AC_CHECK_FUNCS(sbrk)
# Some non-ANSI preprocessors botch requoting inside strings. That's bad
# enough, but on some of those systems, the assert macro relies on requoting
# working properly!