From e63c594dd01aa39ff3b6cd2c7ce7ca725c4f210f Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Wed, 5 Jul 1995 08:04:28 +0000 Subject: [PATCH] * as.c (main): Only use sbrk when HAVE_SBRK defined. * configure.in: Add test for sbrk. * configure: Regenerate using autoconf 2.4. --- gas/ChangeLog | 6 +++ gas/as.c | 9 ++++- gas/configure | 95 ++++++++++++++++++++++++++++++++++++++---------- gas/configure.in | 3 ++ 4 files changed, 92 insertions(+), 21 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 947871670b..6de83ae78b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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. diff --git a/gas/as.c b/gas/as.c index bc8ce44fe8..5a937b38eb 100644 --- a/gas/as.c +++ b/gas/as.c @@ -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 diff --git a/gas/configure b/gas/configure index 02a1f9e0e8..4508d48985 100755 --- a/gas/configure +++ b/gas/configure @@ -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 < Syntax Error @@ -1241,7 +1241,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < 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 @@ -1324,7 +1326,7 @@ else ac_cv_c_cross=yes else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < 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 <&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&6 else cat > conftest.$ac_ext <&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 < +/* 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 <&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 < #include @@ -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 <&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext <