diff options
99 files changed, 363 insertions, 1232 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 365a644..be2e4ad 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -58,10 +58,6 @@ INTL_TARGETS = intl.all intl.install # This is overridden by configure. BOOT_LANGUAGES = c @all_boot_languages@ -ALLOCA = -ALLOCA_FLAGS = -ALLOCA_FINISH = true - # Various ways of specifying flags for compilations: # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2. # BOOT_CFLAGS is the value of CFLAGS to pass to the stage2 and stage3 @@ -509,7 +505,6 @@ HOST_CFLAGS=$(ALL_CFLAGS) -DGENERATOR_FILE HOST_CLIB=$(CLIB) HOST_LDFLAGS=$(LDFLAGS) HOST_CPPFLAGS=$(ALL_CPPFLAGS) -HOST_ALLOCA=$(ALLOCA) HOST_MALLOC=$(MALLOC) HOST_OBSTACK=$(OBSTACK) HOST_VFPRINTF=$(VFPRINTF) @@ -604,34 +599,32 @@ ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) \ # Likewise. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) -# Even if ALLOCA is set, don't use it if compiling with GCC. -USE_ALLOCA= ${ALLOCA} -USE_HOST_ALLOCA= ` case "${HOST_ALLOCA}" in ?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac ` USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac ` USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac ` USE_HOST_VFPRINTF= ` case "${HOST_VFPRINTF}" in ?*) echo ${HOST_PREFIX}${HOST_VFPRINTF} ;; esac ` USE_HOST_DOPRINT= ` case "${HOST_DOPRINT}" in ?*) echo ${HOST_PREFIX}${HOST_DOPRINT} ;; esac ` USE_HOST_STRSTR= ` case "${HOST_STRSTR}" in ?*) echo ${HOST_PREFIX}${HOST_STRSTR} ;; esac ` -# Dependency on obstack, alloca, malloc or whatever library facilities +# Dependency on obstack, malloc or whatever library facilities # are not installed in the system libraries. -# We don't use USE_ALLOCA because backquote expansion doesn't work in deps. -LIBDEPS= $(INTLLIBS) $(OBSTACK) $(ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT) $(STRSTR) +# We don't use USE_* because backquote expansion doesn't work in deps. +LIBDEPS= $(INTLLIBS) $(OBSTACK) $(MALLOC) $(VFPRINTF) $(DOPRINT) $(STRSTR) # Likewise, for use in the tools that must run on this machine # even if we are cross-building GCC. -# We don't use USE_ALLOCA because backquote expansion doesn't work in deps. -HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC) $(HOST_PREFIX)$(HOST_VFPRINTF) $(HOST_PREFIX)$(HOST_DOPRINT) $(HOST_PREFIX)$(HOST_STRSTR) +HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_MALLOC) \ + $(HOST_PREFIX)$(HOST_VFPRINTF) $(HOST_PREFIX)$(HOST_DOPRINT) \ + $(HOST_PREFIX)$(HOST_STRSTR) # How to link with both our special library facilities # and the system's installed libraries. -LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(INTLLIBS) @LIBS@ $(VFPRINTF) $(DOPRINT) $(STRSTR) $(CLIB) ../libiberty/libiberty.a +LIBS = $(OBSTACK) $(MALLOC) $(INTLLIBS) @LIBS@ $(VFPRINTF) $(DOPRINT) \ + $(STRSTR) $(CLIB) ../libiberty/libiberty.a # Likewise, for use in the tools that must run on this machine # even if we are cross-building GCC. -HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \ - $(USE_HOST_VFPRINTF) $(USE_HOST_DOPRINT) $(USE_HOST_STRSTR) \ - $(HOST_CLIB) +HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_MALLOC) $(USE_HOST_VFPRINTF) \ + $(USE_HOST_DOPRINT) $(USE_HOST_STRSTR) $(HOST_CLIB) HOST_RTL = $(HOST_PREFIX)rtl.o $(HOST_PREFIX)bitmap.o \ $(HOST_PREFIX)ggc-none.o gensupport.o hashtab.o safe-ctype.o @@ -1558,15 +1551,6 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) system.h # Build file to support OSF/rose half-pic format. halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H) system.h -# Normally this target is not used; but it is used if you -# define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c -# from the GNU Emacs distribution. -alloca.o: $(srcdir)/../libiberty/alloca.c - rm -f alloca.c - $(LN_S) $(srcdir)/../libiberty/alloca.c alloca.c - $(CC) $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) \ - $(ALLOCA_FLAGS) -c alloca.c - $(ALLOCA_FINISH) # # Generate header and source files from the machine description, # and compile them. @@ -1819,7 +1803,7 @@ gengenrtl.o : gengenrtl.c $(RTL_BASE_H) system.h real.h # Compile the libraries to be used by gen*. # If we are not cross-building, gen* use the same .o's that cc1 will use, # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict -# with the rules for rtl.o, alloca.o, etc. +# with the rules for rtl.o, etc. $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(GCONFIG_H) system.h $(RTL_H) \ bitmap.h $(GGC_H) toplev.h $(HASHTAB_H) rm -f $(HOST_PREFIX)rtl.c @@ -1838,11 +1822,6 @@ $(HOST_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(CONFIG_H) system.h $(RTL_H) \ sed -e 's/config[.]h/hconfig.h/' $(srcdir)/bitmap.c > $(HOST_PREFIX)bitmap.c $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)bitmap.c -$(HOST_PREFIX_1)alloca.o: $(srcdir)/../libiberty/alloca.c - rm -f $(HOST_PREFIX)alloca.c - $(LN_S) $(srcdir)/../libiberty/alloca.c $(HOST_PREFIX)alloca.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c - $(HOST_PREFIX_1)obstack.o: $(srcdir)/../libiberty/obstack.c $(GCONFIG_H) rm -f $(HOST_PREFIX)obstack.c sed -e 's/config[.]h/hconfig.h/' $(srcdir)/../libiberty/obstack.c > $(HOST_PREFIX)obstack.c @@ -1875,7 +1854,7 @@ $(HOST_PREFIX_1)errors.o: errors.c # This satisfies the dependency that we get if you cross-compile a compiler -# that does not need to compile alloca, malloc or whatever. +# that does not need to compile, malloc or whatever. $(HOST_PREFIX_1): touch $(HOST_PREFIX_1) @@ -2294,7 +2273,7 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean -rm -rf libgcc # Delete the temporary source copies for cross compilation. -rm -f $(HOST_PREFIX_1)rtl.c - -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c + -rm -f $(HOST_PREFIX_1)malloc.c -rm -f $(HOST_PREFIX_1)obstack.c # Delete the temp files made in the course of building libgcc.a. -rm -f xlimits.h libgcc1-test @@ -2308,7 +2287,7 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean -rm -f *.[0-9][0-9].* */*.[0-9][0-9].* # Delete some files made during installation. -rm -f specs float.h-* enquire SYSCALLS.c.X SYSCALLS.c - -rm -f collect collect2 mips-tfile mips-tdump alloca.s + -rm -f collect collect2 mips-tfile mips-tdump # Delete files generated for fixproto -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \ gen-protos$(build_exeext) fixproto.list fixtmp.* fixhdr.ready @@ -2363,7 +2342,7 @@ distclean: clean $(INTL_DISTCLEAN) lang.distclean -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak -rm -f testsuite/{gcc,g++}.{log,sum} -rm -f intl/libintl.h libintl.h - -rm -f cxxmain.c splay-tree.c obstack.c alloca.c hashtab.c safe-ctype.c + -rm -f cxxmain.c splay-tree.c obstack.c hashtab.c safe-ctype.c -rm -f mklibgcc libgcc.map gccbug .gdbinit configargs.h -rm -f gcov.pod -rm -f fixinc/Makefile @@ -2903,11 +2882,6 @@ stage1_copy: stage1_build touch stage1_copy echo stage2_build > stage_last -# This used to define ALLOCA as empty, but that would lead to bad results -# for a subsequent `make install' since that would not have ALLOCA empty. -# To prevent `make install' from compiling alloca.o and then relinking cc1 -# because alloca.o is newer, we permit these recursive makes to compile -# alloca.o. Then cc1 is newer, so it won't have to be relinked. stage2_build: stage1_copy $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \ STAGE_PREFIX=stage1/ \ diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 index 9cee656..128dc97 100644 --- a/gcc/aclocal.m4 +++ b/gcc/aclocal.m4 @@ -566,7 +566,6 @@ AC_DEFUN(AM_GNU_GETTEXT, AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h sys/param.h]) diff --git a/gcc/build-make b/gcc/build-make index 1e453a0..c47a78c 100644 --- a/gcc/build-make +++ b/gcc/build-make @@ -16,7 +16,6 @@ HOST_CFLAGS=$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) \ HOST_CLIB= HOST_LDFLAGS=$(LDFLAGS) HOST_CPPFLAGS=$(ALL_CPPFLAGS) -HOST_ALLOCA=$(ALLOCA) HOST_MALLOC=$(MALLOC) HOST_OBSTACK=$(OBSTACK) diff --git a/gcc/config.gcc b/gcc/config.gcc index a128257..0128d33 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -610,7 +610,6 @@ c4x-*) clipper-intergraph-clix*) tm_file="${tm_file} svr3.h clipper/clix.h" xm_file=clipper/xm-clix.h - xmake_file=clipper/x-clix extra_headers=va-clipper.h extra_parts="crtbegin.o crtend.o" install_headers_dir=install-headers-cpio @@ -945,7 +944,7 @@ i370-*-linux*) fi ;; i[34567]86-*-chorusos*) - xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h" + xm_file="${xm_file} xm-svr4.h" tm_file="i386/i386.h i386/att.h elfos.h i386/i386afe.h i386/i386elf.h i386/chorus.h" tmake_file=i386/t-i386elf xmake_file=x-svr4 @@ -956,7 +955,7 @@ i[34567]86-*-chorusos*) esac ;; i[34567]86-*-elf*) - xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h" + xm_file="${xm_file} xm-svr4.h" tm_file="i386/i386.h i386/att.h elfos.h i386/i386afe.h i386/i386elf.h" tmake_file=i386/t-i386elf xmake_file=x-svr4 @@ -971,12 +970,10 @@ i[34567]86-ibm-aix*) # IBM PS/2 running AIX tm_file=i386/aix386ng.h use_collect2=yes fi - xm_file="xm-alloca.h ${xm_file}" xm_defines=USG xmake_file=i386/x-aix ;; i[34567]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4 - xm_file="xm-alloca.h ${xm_file}" xm_defines="USG POSIX SMALL_ARG_MAX" xmake_file=i386/x-ncr3000 if test x$stabs = xyes -a x$gas = xyes @@ -1029,7 +1026,6 @@ i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*) install_headers_dir=install-headers-cpio ;; i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*) - xm_file="xm-alloca.h ${xm_file}" if test x$gas = xyes then tm_file="${tm_file} usegas.h" @@ -1251,7 +1247,7 @@ i[34567]86-*-rtems*|i[34567]86-*-rtemself*) fi ;; i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5 - xm_file="xm-alloca.h ${xm_file} i386/xm-sco5.h" + xm_file="${xm_file} i386/xm-sco5.h" xm_defines="USG SVR3" xmake_file=i386/x-sco5 install_headers_dir=install-headers-cpio @@ -1305,7 +1301,6 @@ i[34567]86-*-sco*) # 80386 running SCO system truncate_target=yes ;; i[34567]86-*-solaris2*) - xm_file="xm-alloca.h ${xm_file}" xm_defines="USG POSIX SMALL_ARG_MAX" tm_file=i386/sol2.h if test x$gas = xyes; then @@ -1330,7 +1325,6 @@ i[34567]86-*-solaris2*) fi ;; i[34567]86-*-sysv5*) # Intel x86 on System V Release 5 - xm_file="xm-alloca.h ${xm_file}" xm_defines="USG POSIX" tm_file=i386/sysv5.h if test x$stabs = xyes @@ -1345,7 +1339,6 @@ i[34567]86-*-sysv5*) # Intel x86 on System V Release 5 fi ;; i[34567]86-*-sysv4*) # Intel 80386's running system V.4 - xm_file="xm-alloca.h ${xm_file}" xm_defines="USG POSIX SMALL_ARG_MAX" tm_file=i386/sysv4.h if test x$stabs = xyes @@ -1357,7 +1350,6 @@ i[34567]86-*-sysv4*) # Intel 80386's running system V.4 extra_parts="crtbegin.o crtend.o" ;; i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit - xm_file="xm-alloca.h ${xm_file}" xm_defines="USG POSIX" tm_file=i386/udk.h tmake_file="i386/t-i386bare i386/t-crtpic i386/t-udk" @@ -1367,7 +1359,7 @@ i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit ;; i[34567]86-*-osf1*) # Intel 80386's running OSF/1 1.3+ cpu_type=i386 - xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h" + xm_file="${xm_file} xm-svr4.h i386/xm-osf1elf.h" xm_defines="USE_C_ALLOCA SMALL_ARG_MAX" if test x$stabs = xyes then @@ -1475,7 +1467,6 @@ i[34567]86-*-interix*) fi ;; i[34567]86-dg-dgux*) - xm_file="xm-alloca.h ${xm_file}" xm_defines="USG POSIX" out_file=i386/dgux.c tm_file=i386/dgux.h @@ -1486,7 +1477,6 @@ i[34567]86-dg-dgux*) i860-alliant-*) # Alliant FX/2800 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h" xm_file="${xm_file}" - xmake_file=i860/x-fx2800 tmake_file=i860/t-fx2800 extra_parts="crtbegin.o crtend.o" ;; @@ -1509,7 +1499,6 @@ i860-*-osf*) # Intel Paragon XP/S, OSF/1AD i860-*-sysv3*) tm_file="${tm_file} svr3.h i860/sysv3.h" xm_defines="USG SVR3" - xmake_file=i860/x-sysv3 extra_parts="crtbegin.o crtend.o" ;; i860-*-sysv4*) @@ -1609,7 +1598,6 @@ m68000-hp-bsd*) # HP 9000/200 running BSD extra_headers=math-68881.h ;; m68000-hp-hpux*) # HP 9000 series 300 - xm_file="xm-alloca.h ${xm_file}" xm_defines="USG" if test x$gas = xyes then @@ -1696,7 +1684,6 @@ m68k-bull-sysv*) # Bull DPX/2 else tm_file=m68k/dpx2.h fi - xm_file="xm-alloca.h ${xm_file}" xm_defines=USG xmake_file=m68k/x-dpx2 use_collect2=yes @@ -1704,7 +1691,6 @@ m68k-bull-sysv*) # Bull DPX/2 ;; m68k-atari-sysv4*) # Atari variant of V.4. tm_file=m68k/atari.h - xm_file="xm-alloca.h ${xm_file}" xm_defines=USG tmake_file=t-svr4 extra_parts="crtbegin.o crtend.o" @@ -1713,7 +1699,7 @@ m68k-atari-sysv4*) # Atari variant of V.4. ;; m68k-motorola-sysv*) tm_file=m68k/mot3300.h - xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}" + xm_file="m68k/xm-mot3300.h ${xm_file}" if test x$gas = xyes then xmake_file=m68k/x-mot3300-gas @@ -1748,19 +1734,17 @@ m68k-ncr-sysv*) # NCR Tower 32 SVR3 ;; m68k-plexus-sysv*) tm_file=m68k/plexus.h - xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}" + xm_file="m68k/xm-plexus.h ${xm_file}" xm_defines=USG use_collect2=yes extra_headers=math-68881.h ;; m68k-tti-*) tm_file=m68k/pbb.h - xm_file="xm-alloca.h ${xm_file}" xm_defines=USG extra_headers=math-68881.h ;; m68k-crds-unos*) - xm_file="xm-alloca.h ${xm_file}" xm_defines="USG unos" xmake_file=m68k/x-crds tm_file=m68k/crds.h @@ -1769,7 +1753,6 @@ m68k-crds-unos*) ;; m68k-cbm-sysv4*) # Commodore variant of V.4. tm_file=m68k/amix.h - xm_file="xm-alloca.h ${xm_file}" xm_defines=USG xmake_file=m68k/x-amix tmake_file=t-svr4 @@ -1808,7 +1791,6 @@ m68k-isi-bsd*) extra_headers=math-68881.h ;; m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7. - xm_file="xm-alloca.h ${xm_file}" xm_defines="USG" if test x$gas = xyes then @@ -1824,7 +1806,6 @@ m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7. float_format=m68k ;; m68k-hp-hpux*) # HP 9000 series 300 - xm_file="xm-alloca.h ${xm_file}" xm_defines="USG" if test x$gas = xyes then @@ -1962,7 +1943,6 @@ m68k*-*-openbsd*) use_collect2=yes ;; m68k-*-sysv3*) # Motorola m68k's running system V.3 - xm_file="xm-alloca.h ${xm_file}" xm_defines=USG extra_parts="crtbegin.o crtend.o" extra_headers=math-68881.h @@ -1970,7 +1950,6 @@ m68k-*-sysv3*) # Motorola m68k's running system V.3 ;; m68k-*-sysv4*) # Motorola m68k's running system V.4 tm_file=m68k/m68kv4.h - xm_file="xm-alloca.h ${xm_file}" xm_defines=USG tmake_file=t-svr4 extra_parts="crtbegin.o crtend.o" @@ -2096,7 +2075,6 @@ m88k-*-openbsd*) m88k-*-sysv3*) tm_file=m88k/sysv3.h extra_parts="crtbegin.o crtend.o" - xmake_file=m88k/x-sysv3 if test x$gas = xyes then tmake_file=m88k/t-m88k-gas @@ -2903,7 +2881,6 @@ sh-*-*) ;; sparc-tti-*) tm_file=sparc/pbd.h - xm_file="xm-alloca.h ${xm_file}" xm_defines=USG ;; sparc64-wrs-vxworks*) @@ -3013,7 +2990,7 @@ sparcv9-*-solaris2*) else tm_file=sparc/sol2-sld-64.h fi - xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h" + xm_file="sparc/xm-sysv4-64.h" xm_defines="USG POSIX" tmake_file="sparc/t-sol2 sparc/t-sol2-64" if test x$gnu_ld = xyes; then @@ -3039,7 +3016,7 @@ sparcv9-*-solaris2*) fi ;; sparc-hal-solaris2*) - xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h" + xm_file="sparc/xm-sysv4.h" xm_defines="USG POSIX" tm_file="sparc/sol2.h sparc/hal.h" tmake_file="sparc/t-halos sparc/t-sol2" @@ -3067,7 +3044,7 @@ sparc-*-solaris2*) else tm_file=sparc/sol2-sld.h fi - xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h" + xm_file="sparc/xm-sysv4.h" xm_defines="USG POSIX" tmake_file=sparc/t-sol2 if test x$gnu_ld = xyes; then @@ -3138,7 +3115,7 @@ sparc-*-sysv4*) extra_parts="crtbegin.o crtend.o" ;; sparc-*-vxsim*) - xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h" + xm_file="sparc/xm-sysv4.h" xm_defines="USG POSIX" tm_file=sparc/vxsim.h tmake_file=sparc/t-vxsparc diff --git a/gcc/config.in b/gcc/config.in index 6ada859..ddb461f 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -1,15 +1,8 @@ /* config.in. Generated automatically from configure.in by autoheader. */ -/* Define if using alloca.c. */ -#undef C_ALLOCA - /* Define to empty if the keyword does not work. */ #undef const -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -#undef CRAY_STACKSEG_END - /* Define to the type of elements in the array set by `getgroups'. Usually this is either `int' or `gid_t'. */ #undef GETGROUPS_T @@ -17,12 +10,6 @@ /* Define to `int' if <sys/types.h> doesn't define. */ #undef gid_t -/* Define if you have alloca, as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define if you have <alloca.h> and it should be used (not on Ultrix). */ -#undef HAVE_ALLOCA_H - /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT @@ -56,15 +43,6 @@ /* Define to `unsigned' if <sys/types.h> doesn't define. */ #undef size_t -/* If using the C implementation of alloca, 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 - STACK_DIRECTION = 0 => direction of growth unknown - */ -#undef STACK_DIRECTION - /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS diff --git a/gcc/config/alpha/xm-alpha.h b/gcc/config/alpha/xm-alpha.h index f68b4ed..1531a8e 100644 --- a/gcc/config/alpha/xm-alpha.h +++ b/gcc/config/alpha/xm-alpha.h @@ -27,19 +27,6 @@ Boston, MA 02111-1307, USA. */ #define HOST_BITS_PER_LONG 64 #define HOST_BITS_PER_LONGLONG 64 -/* If compiled with GNU C, use the builtin alloca. */ -#ifndef alloca -#if defined(__GNUC__) && !defined(USE_C_ALLOCA) -#define alloca __builtin_alloca -#else -#if !defined(_WIN32) && !defined(USE_C_ALLOCA) && !defined(OPEN_VMS) && !defined(__INTERIX) -#include <alloca.h> -#else -extern void *alloca (); -#endif -#endif -#endif - /* The host compiler has problems with enum bitfields since it makes them signed so we can't fit all our codes in. */ diff --git a/gcc/config/alpha/xm-vms.h b/gcc/config/alpha/xm-vms.h index 16e89c8..9974e66 100644 --- a/gcc/config/alpha/xm-vms.h +++ b/gcc/config/alpha/xm-vms.h @@ -69,8 +69,6 @@ Boston, MA 02111-1307, USA. */ #define HAVE_STRERROR #define HAVE_ATOLL -#define USE_C_ALLOCA /* Using alloca.c */ - #define HAVE_FCNTL_H 1 #define HAVE_STDLIB_H 1 #define HAVE_UNISTD_H 1 @@ -81,11 +79,5 @@ Boston, MA 02111-1307, USA. */ #define STDC_HEADERS 1 #define HAVE_STRINGIZE 1 -#if __STDC__ -extern void *alloca (size_t); -#else -extern char *alloca (unsigned int); -#endif - #define OBJECT_SUFFIX ".obj" #define EXECUTABLE_SUFFIX ".exe" diff --git a/gcc/config/arc/xm-arc.h b/gcc/config/arc/xm-arc.h index 1742ed2..a98d9c3 100644 --- a/gcc/config/arc/xm-arc.h +++ b/gcc/config/arc/xm-arc.h @@ -28,8 +28,3 @@ Boston, MA 02111-1307, USA. */ /* Doubles are stored in memory with the high order word first. This matters when cross-compiling. */ #define HOST_WORDS_BIG_ENDIAN 1 - -/* If compiled with Sun CC, the use of alloca requires this #include. */ -#ifndef __GNUC__ -#include "alloca.h" -#endif diff --git a/gcc/config/arm/xm-arm.h b/gcc/config/arm/xm-arm.h index efb1ecf..ff16b71 100644 --- a/gcc/config/arm/xm-arm.h +++ b/gcc/config/arm/xm-arm.h @@ -36,11 +36,6 @@ Boston, MA 02111-1307, USA. */ #define HOST_FLOAT_WORDS_BIG_ENDIAN 1 -/* If not compiled with GNU C, use C alloca. */ -#ifndef __GNUC__ -#define USE_C_ALLOCA -#endif - /* If we have defined POSIX, but are compiling in the BSD environment, then we need to define getcwd in terms of getwd. */ #if defined (POSIX) && defined (_BSD_C) diff --git a/gcc/config/clipper/x-clix b/gcc/config/clipper/x-clix deleted file mode 100644 index 155161f..0000000 --- a/gcc/config/clipper/x-clix +++ /dev/null @@ -1 +0,0 @@ -ALLOCA = alloca.o diff --git a/gcc/config/d30v/xm-d30v.h b/gcc/config/d30v/xm-d30v.h index 9423cae..b4ba49f 100644 --- a/gcc/config/d30v/xm-d30v.h +++ b/gcc/config/d30v/xm-d30v.h @@ -34,11 +34,3 @@ /* A C expression for the number of bits in `long' on the host machine. */ #define HOST_BITS_PER_LONG 32 - -/* Define this macro to indicate that the compiler is running with the `alloca' - implemented in C. */ -#ifndef __GNUC__ -#define USE_C_ALLOCA -#else -#define alloca __builtin_alloca -#endif diff --git a/gcc/config/dsp16xx/xm-dsp16xx.h b/gcc/config/dsp16xx/xm-dsp16xx.h index 31c225d..c02c8a9 100644 --- a/gcc/config/dsp16xx/xm-dsp16xx.h +++ b/gcc/config/dsp16xx/xm-dsp16xx.h @@ -25,10 +25,3 @@ Boston, MA 02111-1307, USA. */ #define HOST_BITS_PER_INT 16 #define HOST_BITS_PER_LONG 32 #define HOST_BITS_PER_LONGLONG 64 - -/* If compiled with GNU C, use the built-in alloca */ -#ifdef __GNUC__ -#define alloca __builtin_alloca -#else -#define USE_C_ALLOCA -#endif diff --git a/gcc/config/h8300/xm-h8300.h b/gcc/config/h8300/xm-h8300.h index 171faab..10a1269 100644 --- a/gcc/config/h8300/xm-h8300.h +++ b/gcc/config/h8300/xm-h8300.h @@ -24,10 +24,3 @@ Boston, MA 02111-1307, USA. */ #define HOST_BITS_PER_INT 16 #define HOST_BITS_PER_LONG 32 #define HOST_BITS_PER_LONGLONG 64 - -/* If compiled with GNU C, use the built-in alloca */ -#ifdef __GNUC__ -#define alloca __builtin_alloca -#else -#define USE_C_ALLOCA -#endif diff --git a/gcc/config/i370/x-oe b/gcc/config/i370/x-oe index b6db96a..c947cc9 100644 --- a/gcc/config/i370/x-oe +++ b/gcc/config/i370/x-oe @@ -2,10 +2,6 @@ # Host is an i370 running OpenEdition # -# Use GCC alloca - -ALLOCA = alloca.o - # Don't bother fixing up header files, they're wierd STMP_FIXPROTO = diff --git a/gcc/config/i370/xm-linux.h b/gcc/config/i370/xm-linux.h index 22564df..7a81701 100644 --- a/gcc/config/i370/xm-linux.h +++ b/gcc/config/i370/xm-linux.h @@ -31,13 +31,7 @@ Boston, MA 02111-1307, USA. */ #define HOST_WORDS_BIG_ENDIAN -/* If not compiled with GNU C, use the C alloca and use only int bitfields. */ +/* If not compiled with GNU C, use only int bitfields. */ #ifndef __GNUC__ -#define USE_C_ALLOCA -#if __STDC__ -extern void *alloca (); -#else -extern char *alloca (); -#endif #define ONLY_INT_FIELDS #endif diff --git a/gcc/config/i386/x-aix b/gcc/config/i386/x-aix index b191e48..8e867fc 100644 --- a/gcc/config/i386/x-aix +++ b/gcc/config/i386/x-aix @@ -1,6 +1,3 @@ -# There is an alloca in -lbsd, but it is limited to 32K -ALLOCA = alloca.o - # If you are running out of memory while compiling gcc, with the standard # /bin/cc uncomment MALLOCLIB line. That version of malloc is slower but # has less overhead than the one in libc. diff --git a/gcc/config/i386/x-beos b/gcc/config/i386/x-beos index 426d0c0..e4fd443 100644 --- a/gcc/config/i386/x-beos +++ b/gcc/config/i386/x-beos @@ -1,12 +1,5 @@ # configuration for BeOS INSTALL=install -c -# Show we need to use the C version of ALLOCA -ALLOCA=alloca.o -# Use it regardless of whether we are compiling with gcc or not. -USE_ALLOCA= `echo "${ALLOCA}"` -USE_HOST_ALLOCA= `echo ${HOST_PREFIX}${HOST_ALLOCA}` -SUBDIR_USE_ALLOCA = `if [ x$(ALLOCA) != x ]; then echo ../$(ALLOCA); else true; fi` - # Don't run fixproto STMP_FIXPROTO = diff --git a/gcc/config/i386/x-ncr3000 b/gcc/config/i386/x-ncr3000 index 4ae168b..a18786a 100644 --- a/gcc/config/i386/x-ncr3000 +++ b/gcc/config/i386/x-ncr3000 @@ -17,13 +17,6 @@ CCLIBFLAGS= # The rest is just x-i386v4. -# Some versions of SVR4 have an alloca in /usr/ucblib/libucb.a, and if we are -# careful to link that in after libc we can use it, but since newer versions of -# SVR4 are dropping libucb, it is better to just use the portable C version for -# bootstrapping. Do this by defining ALLOCA. - -ALLOCA = alloca.o - # We used to build all stages *without* shared libraries because that may make # debugging the compiler easier (until there is a GDB which supports # both Dwarf *and* svr4 shared libraries). diff --git a/gcc/config/i386/x-sco5 b/gcc/config/i386/x-sco5 index e13ed74..c9b78c2 100644 --- a/gcc/config/i386/x-sco5 +++ b/gcc/config/i386/x-sco5 @@ -3,8 +3,6 @@ RANLIB_TEST = false CC = cc OLDCC = cc CCLIBFLAGS = -# We avoid the ALLOCA in -lPW becuase it gives us an evil index() -ALLOCA = alloca.o # See all the declarations. FIXPROTO_DEFINES = -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=2 diff --git a/gcc/config/i386/xm-beos.h b/gcc/config/i386/xm-beos.h index b133ba9..f62dd53 100644 --- a/gcc/config/i386/xm-beos.h +++ b/gcc/config/i386/xm-beos.h @@ -47,3 +47,10 @@ Boston, MA 02111-1307, USA. */ #define HAVE_PUTENV #endif #define HAVE_RENAME + +/* This is a temporary hack until the wimpy default 64k stack + limit in BeOS is either increased or made user settable somehow. + This probably won't happen until after the DR9 release. */ +#undef USE_C_ALLOCA +#define USE_C_ALLOCA 1 + diff --git a/gcc/config/i386/xm-dgux.h b/gcc/config/i386/xm-dgux.h index d322b47..874b148 100644 --- a/gcc/config/i386/xm-dgux.h +++ b/gcc/config/i386/xm-dgux.h @@ -4,8 +4,3 @@ #include "i386/xm-i386.h" #include "xm-svr4.h" - -/* If not compiled with GNU C, use the portable alloca. */ -#ifndef __GNUC__ -#define USE_C_ALLOCA -#endif diff --git a/gcc/config/i386/xm-sysv4.h b/gcc/config/i386/xm-sysv4.h deleted file mode 100644 index 1365064..0000000 --- a/gcc/config/i386/xm-sysv4.h +++ /dev/null @@ -1,5 +0,0 @@ -/* Configuration for GCC for Intel i386 running System V Release 4. */ - -#ifdef __HIGHC__ -#include <alloca.h> /* for MetaWare High-C on NCR System 3000 */ -#endif diff --git a/gcc/config/i860/x-fx2800 b/gcc/config/i860/x-fx2800 deleted file mode 100644 index cf05f8f..0000000 --- a/gcc/config/i860/x-fx2800 +++ /dev/null @@ -1,7 +0,0 @@ - -# The Alliant FX2800 is supposed to conform to the SysV R4 i860 ABI, -# but apparently the native compiler generates non ABI-compliant -# function prologues and epilogues, so we need the alloca from emacs. -# -- hyc@hanauma.jpl.nasa.gov - -ALLOCA=alloca.o diff --git a/gcc/config/i860/x-sysv3 b/gcc/config/i860/x-sysv3 deleted file mode 100644 index 3375d42..0000000 --- a/gcc/config/i860/x-sysv3 +++ /dev/null @@ -1 +0,0 @@ -ALLOCA=alloca.o diff --git a/gcc/config/i860/x-sysv4 b/gcc/config/i860/x-sysv4 index c01fb88..37b79dd 100644 --- a/gcc/config/i860/x-sysv4 +++ b/gcc/config/i860/x-sysv4 @@ -1,36 +1,3 @@ -# The svr4 reference port for the i860 contains an alloca.o routine -# in /usr/ucblib/libucb.a, but we can't just try to get that by -# setting CLIB to /usr/ucblib/libucb.a because (unfortunately) -# there are a lot of other routines in libucb.a which are supposed -# to be the Berkeley versions of library routines normally found in -# libc.a and many of these Berkeley versions are badly broken. Thus, -# if we try to link programs with libucb.a before libc.a, those -# programs tend to crash. - -# Also, the alloca() routine supplied in early version of svr4 for -# the i860 is non-ABI compliant. It doesn't keep the stack aligned -# to a 16-byte boundary as the ABI requires. - -# More importantly however, even a fully ABI compliant alloca() routine -# would fail to work correctly with some versions of the native svr4 C -# compiler currently being distributed for the i860 (as of 1/29/92). -# The problem is that the native C compiler generates non-ABI-compliant -# function epilogues which cut back the stack (upon function exit) in -# an incorrect manner. Specifically, they cut back the stack by adding -# the nominal *static* frame size (determined statically at compile-time) -# to the stack pointer rather than setting the stack pointer based upon -# the current value of the frame pointer (as called for in the i860 ABI). -# This can cause serious trouble in cases where you repeatedly call a -# routine which itself calls alloca(). In such cases, the stack will -# grow continuously until you finally run out of swap space or exceed -# the system's process size limit. To avoid this problem (which can -# arise when a stage1 gcc is being used to build a stage2 gcc) you -# *must* link in the C language version of alloca() which is supplied -# with gcc to your stage1 version of gcc. The following definition -# forces that to happen. - -ALLOCA=alloca.o - # We build all stages *without* shared libraries because that may make # debugging the compiler easier (until there is a GDB which supports # both Dwarf *and* svr4 shared libraries). diff --git a/gcc/config/i960/xm-i960.h b/gcc/config/i960/xm-i960.h index 991b736..3617cae 100644 --- a/gcc/config/i960/xm-i960.h +++ b/gcc/config/i960/xm-i960.h @@ -24,8 +24,3 @@ Boston, MA 02111-1307, USA. */ #define HOST_BITS_PER_INT 32 #define HOST_BITS_PER_LONG 32 #define HOST_BITS_PER_LONGLONG 64 - -/* If not compiled with GNU C, use the C alloca */ -#ifndef __GNUC__ -#define USE_C_ALLOCA -#endif diff --git a/gcc/config/m32r/xm-m32r.h b/gcc/config/m32r/xm-m32r.h index 948b130..c99240a 100644 --- a/gcc/config/m32r/xm-m32r.h +++ b/gcc/config/m32r/xm-m32r.h @@ -28,8 +28,3 @@ Boston, MA 02111-1307, USA. */ /* Doubles are stored in memory with the high order word first. This matters when cross-compiling. */ #define HOST_WORDS_BIG_ENDIAN 1 - -/* If compiled with Sun CC, the use of alloca requires this #include. */ -#ifndef __GNUC__ -#include "alloca.h" -#endif diff --git a/gcc/config/m68k/x-crds b/gcc/config/m68k/x-crds index 172909c..a6f57c2 100644 --- a/gcc/config/m68k/x-crds +++ b/gcc/config/m68k/x-crds @@ -1,7 +1 @@ CC = cc -Wx,-X23 - -# The following line might be necessary as well or instead of the above. -# If you find out that it is necessary, -# or if you find out that it is not necessary, -# please inform bug-gcc@prep.ai.mit.edu. -# ALLOCA = alloca.o diff --git a/gcc/config/m68k/x-dpx2 b/gcc/config/m68k/x-dpx2 index a4a8c1b..36c5d96 100644 --- a/gcc/config/m68k/x-dpx2 +++ b/gcc/config/m68k/x-dpx2 @@ -1,8 +1,3 @@ -# need this when using cc -ALLOCA = alloca.o -# avoid lossage assembling alloca. -ALLOCA_FLAGS=-S -ALLOCA_FINISH = $(AS) -o alloca.o alloca.s # be sure not to confuse ./as with /bin/as AS=`if [ x$(OLDCC) = x$(CC) ] ; then echo /bin/as; else echo $(GAS); fi` GAS = gas diff --git a/gcc/config/m68k/x-hp320 b/gcc/config/m68k/x-hp320 index 1107ae4..e24fdc4 100644 --- a/gcc/config/m68k/x-hp320 +++ b/gcc/config/m68k/x-hp320 @@ -1,7 +1,6 @@ # Make assignments for compilation on HPUX with their C compiler. CC=cc -Wc,-Nw2000 -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300 OLDCC=cc -Wc,-Nw2000 -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300 -ALLOCA=alloca.o # For CCLIBFLAGS you might want to specify the switch that # forces only 68000 instructions to be used. @@ -9,7 +8,5 @@ ALLOCA=alloca.o # Version 5 of HPUX had a compiler bug that made it crash with -g. # You must set CFLAGS to empty on version 5. -# You must get alloca.c from GNU Emacs. - # So putenv and other functions get seen by fixproto. FIXPROTO_DEFINES = -D_HPUX_SOURCE diff --git a/gcc/config/m68k/x-hp320g b/gcc/config/m68k/x-hp320g index 8417137..9b31a3c 100644 --- a/gcc/config/m68k/x-hp320g +++ b/gcc/config/m68k/x-hp320g @@ -1,7 +1,6 @@ # Make assignments for compilation on HPUX with their C compiler. CC=cc -Wc,-Nw2000 -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300 OLDCC=cc -Wc,-Nw2000 -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300 -ALLOCA=alloca.o # For CCLIBFLAGS you might want to specify the switch that # forces only 68000 instructions to be used. diff --git a/gcc/config/m68k/x-mot3300 b/gcc/config/m68k/x-mot3300 index 14d86d1..d13818f 100644 --- a/gcc/config/m68k/x-mot3300 +++ b/gcc/config/m68k/x-mot3300 @@ -1,5 +1,3 @@ -ALLOCA=alloca.o - # This disables the long/short jump optimization. # I use sysV68 R3V7.1 RM04 (phdm@info.ucl.ac.be) # Since ss-950318, with jump optimization enabled, "as" issues a warning diff --git a/gcc/config/m68k/x-mot3300-gas b/gcc/config/m68k/x-mot3300-gas index cf27977..90852be 100644 --- a/gcc/config/m68k/x-mot3300-gas +++ b/gcc/config/m68k/x-mot3300-gas @@ -1,5 +1,3 @@ -ALLOCA=alloca.o - # This disables the long/short jump optimization. # I use sysV68 R3V7.1 RM04 (phdm@info.ucl.ac.be) # Since ss-950318, with jump optimization enabled, "as" issues a warning diff --git a/gcc/config/m68k/xm-amix.h b/gcc/config/m68k/xm-amix.h index 588b15e..44e88a0 100644 --- a/gcc/config/m68k/xm-amix.h +++ b/gcc/config/m68k/xm-amix.h @@ -20,7 +20,3 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "m68k/xm-m68kv.h" /* Use the System V flavor of m68k host */ - -#if defined (__GNUC__) && __GNUC__ == 1 -#define alloca __builtin_alloca -#endif diff --git a/gcc/config/m68k/xm-hp320.h b/gcc/config/m68k/xm-hp320.h index df48bdd..962a654 100644 --- a/gcc/config/m68k/xm-hp320.h +++ b/gcc/config/m68k/xm-hp320.h @@ -2,9 +2,3 @@ #define USG #include "m68k/xm-m68k.h" - -/* If compiling with HPUX compiler, we are probably using alloca.c, - so help it work right. */ -#ifndef __GNUC__ -#define USE_C_ALLOCA -#endif diff --git a/gcc/config/m68k/xm-m68kv.h b/gcc/config/m68k/xm-m68kv.h index d0931f0..b3d8887 100644 --- a/gcc/config/m68k/xm-m68kv.h +++ b/gcc/config/m68k/xm-m68kv.h @@ -3,7 +3,3 @@ #include "m68k/xm-m68k.h" #define USG - -#ifndef __GNUC__ -#define USE_C_ALLOCA -#endif diff --git a/gcc/config/m68k/xm-mot3300.h b/gcc/config/m68k/xm-mot3300.h index f8eabbd..aed9c6e 100644 --- a/gcc/config/m68k/xm-mot3300.h +++ b/gcc/config/m68k/xm-mot3300.h @@ -21,12 +21,3 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define USG 1 - -/* do not use alloca from -lPW with cc, because function epilogues use %sp */ -#ifndef __GNUC__ -#ifdef __STDC__ -extern void *alloca (); -#else -extern char *alloca (); -#endif -#endif diff --git a/gcc/config/m88k/x-dolph b/gcc/config/m88k/x-dolph index b31a7a9..c63d17e 100644 --- a/gcc/config/m88k/x-dolph +++ b/gcc/config/m88k/x-dolph @@ -6,12 +6,6 @@ EXTRA_PARTS=crtbegin.o crtend.o gcc.ld gcc.ld: $(srcdir)/config/m88k/dolphin.ld rm -f gcc.ld; cp $(srcdir)/config/m88k/dolphin.ld gcc.ld -# Green Hills C on Dolphin UNIX System V/88 Release 3.2 Version 3.6/5.86 does -# not provide alloca. It does not harm to have it defined on version 3.8.alfa -# even though it's not needed there. - -ALLOCA=alloca.o - # Under DolphinOS 3.8.alfa, /bin/cc defines __GNUC__, but not __m88k__, # causing gdstarg.h to fail. Defining __m88k__ does probably not hurt on # DolphinOS 3.6. diff --git a/gcc/config/m88k/x-sysv3 b/gcc/config/m88k/x-sysv3 deleted file mode 100644 index 3ee9067..0000000 --- a/gcc/config/m88k/x-sysv3 +++ /dev/null @@ -1,7 +0,0 @@ -# this is m88k/x-sysv3 - -# native compiler does not provide alloca - -ALLOCA = alloca.o - -# end m88k/x-sysv3 diff --git a/gcc/config/m88k/x-sysv4 b/gcc/config/m88k/x-sysv4 index dd24287..e2b79d0 100644 --- a/gcc/config/m88k/x-sysv4 +++ b/gcc/config/m88k/x-sysv4 @@ -4,7 +4,3 @@ # results in a problem when <wait.h> includes <siginfo.h>. X_CFLAGS = -DNO_BUGS -D__STDC__=0 - -# The CI5 compiler does not provide alloca. - -ALLOCA = alloca.o diff --git a/gcc/config/m88k/x-tekXD88 b/gcc/config/m88k/x-tekXD88 index b8b4a2f..cf19e82 100644 --- a/gcc/config/m88k/x-tekXD88 +++ b/gcc/config/m88k/x-tekXD88 @@ -4,9 +4,6 @@ EXTRA_PARTS=crtbegin.o crtend.o gcc.ld gcc.ld: $(srcdir)/config/m88k/tekXD88.ld rm -f gcc.ld; cp $(srcdir)/config/m88k/tekXD88.ld ./gcc.ld -# Green Hills C on the Tektronix XD88 does not provide alloca. -ALLOCA=alloca.o - # rc is cleaner, but the ar program sometimes crashes. # This is a workaround. AR_FLAGS=qc diff --git a/gcc/config/m88k/xm-m88k.h b/gcc/config/m88k/xm-m88k.h index afb68f8..38140f4 100644 --- a/gcc/config/m88k/xm-m88k.h +++ b/gcc/config/m88k/xm-m88k.h @@ -37,11 +37,6 @@ Boston, MA 02111-1307, USA. */ #endif #endif -/* If not compiled with GNU C, use the C alloca */ -#ifndef __GNUC__ -#define USE_C_ALLOCA -#endif - /* For DG/UX, the best size is different. */ #ifdef __DGUX__ #define OBSTACK_CHUNK_SIZE (8192-16) diff --git a/gcc/config/mcore/xm-mcore.h b/gcc/config/mcore/xm-mcore.h index 6ec0129..bdbe862 100644 --- a/gcc/config/mcore/xm-mcore.h +++ b/gcc/config/mcore/xm-mcore.h @@ -22,8 +22,3 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define HOST_BITS_PER_SHORT 16 #define HOST_BITS_PER_INT 32 #define HOST_BITS_PER_LONG 32 - -/* If compiled with GNU C, use the built-in alloca. */ -#ifdef __GNUC__ -#define alloca __builtin_alloca -#endif diff --git a/gcc/config/mips/x-iris b/gcc/config/mips/x-iris index cf135d1..99c7fc9 100644 --- a/gcc/config/mips/x-iris +++ b/gcc/config/mips/x-iris @@ -23,9 +23,6 @@ # -lmalloc is supposed to be faster than the normal malloc CLIB = -lmld -lmalloc -# Show we need to use the C version of ALLOCA -ALLOCA = alloca.o - # Find all of the declarations from the header files FIXPROTO_DEFINES= -D__EXTENSIONS__ -D_SGI_SOURCE -D_LANGUAGE_C_PLUS_PLUS diff --git a/gcc/config/mips/x-iris3 b/gcc/config/mips/x-iris3 index 2743ab7..f8948e8 100644 --- a/gcc/config/mips/x-iris3 +++ b/gcc/config/mips/x-iris3 @@ -25,6 +25,3 @@ # -lmld is so we can link collect2 running native. # -lmalloc is supposed to be faster than the normal malloc CLIB = -lmld -lmalloc - -# Show we need to use the C version of ALLOCA -ALLOCA = alloca.o diff --git a/gcc/config/mips/x-sni-svr4 b/gcc/config/mips/x-sni-svr4 index a6e003f..e7fe4ee 100644 --- a/gcc/config/mips/x-sni-svr4 +++ b/gcc/config/mips/x-sni-svr4 @@ -9,8 +9,3 @@ CC = $(OLDCC) OPT = OLDCC = cc -Olimit 3000 $(OPT) - -# Show we need to use the C version of ALLOCA -# The SVR3 configurations have it, but the SVR4 configurations don't. -# For now, just try using it for all SVR* configurations. -ALLOCA = alloca.o diff --git a/gcc/config/mips/x-sysv b/gcc/config/mips/x-sysv index 2c173b1..09d467a 100644 --- a/gcc/config/mips/x-sysv +++ b/gcc/config/mips/x-sysv @@ -19,8 +19,3 @@ OLDCC = cc -Wf,-XNg1500,-XNh2000 -Olimit 3000 $(OPT) # This enables collect2 to link. # Some systems use version 2.11 of the compilers. Some use version 3.11. CLIB= -L/usr/lib/cmplrs/cc2.11 -L/usr/lib/cmplrs/cc3.11 -lmld - -# Show we need to use the C version of ALLOCA -# The SVR3 configurations have it, but the SVR4 configurations don't. -# For now, just try using it for all SVR* configurations. -ALLOCA = alloca.o diff --git a/gcc/config/mips/xm-iris6.h b/gcc/config/mips/xm-iris6.h index d42089f..576087b 100644 --- a/gcc/config/mips/xm-iris6.h +++ b/gcc/config/mips/xm-iris6.h @@ -1,14 +1,3 @@ -#define MIPS_OVERRIDE_ALLOCA -#ifndef __GNUC__ -#include <alloca.h> -#else -# ifdef __SIZE_TYPE__ -extern void *alloca (__SIZE_TYPE__); -# else -extern void *alloca (); -# endif /* __SIZE_TYPE__ */ -#endif - #include "mips/xm-mips.h" #define USG diff --git a/gcc/config/mips/xm-mips.h b/gcc/config/mips/xm-mips.h index 71af928..eabe3a5 100644 --- a/gcc/config/mips/xm-mips.h +++ b/gcc/config/mips/xm-mips.h @@ -42,16 +42,3 @@ Boston, MA 02111-1307, USA. */ for compiling GNU C++. */ #define ONLY_INT_FIELDS 1 #endif - -#ifndef MIPS_OVERRIDE_ALLOCA -#ifndef __GNUC__ -#define USE_C_ALLOCA - -#ifdef __STDC__ -extern void * alloca (); -#else -extern char * alloca (); -#endif - -#endif -#endif /* not MIPS_OVERRIDE_ALLOCA */ diff --git a/gcc/config/mips/xm-nws3250v4.h b/gcc/config/mips/xm-nws3250v4.h index 34ab631..ee7fe04 100644 --- a/gcc/config/mips/xm-nws3250v4.h +++ b/gcc/config/mips/xm-nws3250v4.h @@ -1,9 +1,3 @@ #define USG #include "xm-mips.h" - -/* If compiling with mips compiler, we are probably using alloca.c, - so help it work right. */ -#ifndef __GNUC__ -#define USE_C_ALLOCA -#endif diff --git a/gcc/config/pa/x-pa-hpux b/gcc/config/pa/x-pa-hpux index 8561f01..11c2846 100644 --- a/gcc/config/pa/x-pa-hpux +++ b/gcc/config/pa/x-pa-hpux @@ -1,4 +1,2 @@ -ALLOCA=alloca.o - # So putenv and other functions get seen by fixproto. FIXPROTO_DEFINES = -D_HPUX_SOURCE -D_HIUX_SOURCE diff --git a/gcc/config/pa/x-pa-mpeix b/gcc/config/pa/x-pa-mpeix index 5baafba..390e28c 100644 --- a/gcc/config/pa/x-pa-mpeix +++ b/gcc/config/pa/x-pa-mpeix @@ -1,4 +1,3 @@ -ALLOCA=alloca.o X_CFLAGS=-I/usr/contrib/include -DSYSV -D_POSIX_SOURCE -D_SOCKET_SOURCE -D_MPEIX_SOURCE -DPOSIX -D_MPEXL_SOURCE CC=gcc AR=/bin/ar diff --git a/gcc/config/pa/xm-pa.h b/gcc/config/pa/xm-pa.h index d7c7d48..231df9e 100644 --- a/gcc/config/pa/xm-pa.h +++ b/gcc/config/pa/xm-pa.h @@ -39,7 +39,3 @@ Boston, MA 02111-1307, USA. */ /* HP's compiler has problems with enum bitfields. */ #define ONLY_INT_FIELDS - -/* Always claim to use C alloca; this prevents losing if building with - gcc -fno-builtin ... */ -#define USE_C_ALLOCA diff --git a/gcc/config/pa/xm-pa64hpux.h b/gcc/config/pa/xm-pa64hpux.h index 68c80af..3439697 100644 --- a/gcc/config/pa/xm-pa64hpux.h +++ b/gcc/config/pa/xm-pa64hpux.h @@ -18,7 +18,6 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* HP-UX is a flavor of System V */ #define USG @@ -35,7 +34,3 @@ Boston, MA 02111-1307, USA. */ /* HP's compiler has problems with enum bitfields. */ #define ONLY_INT_FIELDS - -/* Always claim to use C alloca; this prevents losing if building with - gcc -fno-builtin ... */ -#define USE_C_ALLOCA diff --git a/gcc/config/pa/xm-pahpux.h b/gcc/config/pa/xm-pahpux.h index 651a0ed..9d0d455 100644 --- a/gcc/config/pa/xm-pahpux.h +++ b/gcc/config/pa/xm-pahpux.h @@ -35,7 +35,3 @@ Boston, MA 02111-1307, USA. */ /* HP's compiler has problems with enum bitfields. */ #define ONLY_INT_FIELDS - -/* Always claim to use C alloca; this prevents losing if building with - gcc -fno-builtin ... " */ -#define USE_C_ALLOCA diff --git a/gcc/config/pa/xm-papro.h b/gcc/config/pa/xm-papro.h index 2f72d29..534d037 100644 --- a/gcc/config/pa/xm-papro.h +++ b/gcc/config/pa/xm-papro.h @@ -32,7 +32,3 @@ Boston, MA 02111-1307, USA. */ /* HP's compiler has problems with enum bitfields. */ #define ONLY_INT_FIELDS - -/* Always claim to use C alloca; this prevents losing if building with - gcc -fno-builtin ... */ -#define USE_C_ALLOCA diff --git a/gcc/config/romp/xm-romp.h b/gcc/config/romp/xm-romp.h index 822ad23..c12fd3d 100644 --- a/gcc/config/romp/xm-romp.h +++ b/gcc/config/romp/xm-romp.h @@ -27,10 +27,9 @@ Boston, MA 02111-1307, USA. */ #define HOST_WORDS_BIG_ENDIAN -/* If compiled with hc, use the built-in alloca and memcpy. +/* If compiled with hc, use the built-in memcpy. These definitions assume hc version 2. */ #ifdef __HIGHC__ -#define alloca _Alloca #define bcopy(s,d,l) memcpy(d,s,l) #define FUNCTION_CONVERSION_BUG #endif diff --git a/gcc/config/rs6000/x-aix31 b/gcc/config/rs6000/x-aix31 index 9f171fc..311f767 100644 --- a/gcc/config/rs6000/x-aix31 +++ b/gcc/config/rs6000/x-aix31 @@ -1,7 +1,3 @@ -# configuration for IBM rs6000 running aix -# Show we need to use the C version of ALLOCA -ALLOCA=alloca.o - # For some reason, we need -lm for cc1. # We need -lld for collect2 (actually this only matters # for a native compiler, but this is as good a place as any diff --git a/gcc/config/rs6000/x-aix41 b/gcc/config/rs6000/x-aix41 index 3a2707e3..d573d4d 100644 --- a/gcc/config/rs6000/x-aix41 +++ b/gcc/config/rs6000/x-aix41 @@ -1,8 +1,5 @@ # configuration for IBM RS/6000 running AIX 4.1+ -# Show we need to use the C version of ALLOCA -ALLOCA=alloca.o - # We need -lld for collect2 (actually this only matters # for a native compiler, but this is as good a place as any # to define the symbol). diff --git a/gcc/config/rs6000/x-beos b/gcc/config/rs6000/x-beos index 37b8cca..16fc937 100644 --- a/gcc/config/rs6000/x-beos +++ b/gcc/config/rs6000/x-beos @@ -1,9 +1,2 @@ # configuration for BeOS INSTALL=install -c - -# Show we need to use the C version of ALLOCA -ALLOCA=alloca.o -# Use it regardless of whether we are compiling with gcc or not. -USE_ALLOCA= `echo "${ALLOCA}"` -USE_HOST_ALLOCA= `echo ${HOST_PREFIX}${HOST_ALLOCA}` -SUBDIR_USE_ALLOCA = `if [ x$(ALLOCA) != x ]; then echo ../$(ALLOCA); else true; fi` diff --git a/gcc/config/rs6000/x-lynx b/gcc/config/rs6000/x-lynx index a1a2a73..341e908 100644 --- a/gcc/config/rs6000/x-lynx +++ b/gcc/config/rs6000/x-lynx @@ -5,9 +5,6 @@ OLDCC = /bin/gcc # /bin/sh is too buggy, so use /bin/bash instead. SHELL = /bin/bash -# Show we need to use the C version of ALLOCA -ALLOCA=alloca.o - # configuration for IBM rs6000 running lynx # For some reason, we need -lm for cc1. diff --git a/gcc/config/rs6000/x-mach b/gcc/config/rs6000/x-mach index 64f39a5..dcff838 100644 --- a/gcc/config/rs6000/x-mach +++ b/gcc/config/rs6000/x-mach @@ -1,7 +1,4 @@ # configuration for IBM rs6000 running MACH -# Show we need to use the C version of ALLOCA -ALLOCA=alloca.o - # For some reason, we need -lm for cc1. CLIB=-lm diff --git a/gcc/config/rs6000/x-rs6000 b/gcc/config/rs6000/x-rs6000 index 0d8f311..6e553cc 100644 --- a/gcc/config/rs6000/x-rs6000 +++ b/gcc/config/rs6000/x-rs6000 @@ -1,8 +1,5 @@ # configuration for IBM rs6000 running aix -# Show we need to use the C version of ALLOCA -ALLOCA=alloca.o - # We need -lld for collect2 (actually this only matters # for a native compiler, but this is as good a place as any # to define the symbol). diff --git a/gcc/config/rs6000/x-sysv4 b/gcc/config/rs6000/x-sysv4 index 2a661e3..71eaec6 100644 --- a/gcc/config/rs6000/x-sysv4 +++ b/gcc/config/rs6000/x-sysv4 @@ -1,2 +1 @@ X_CFLAGS=-DSVR4 -ALLOCA=alloca.o diff --git a/gcc/config/rs6000/xm-beos.h b/gcc/config/rs6000/xm-beos.h index d96a9aa..caebbcb 100644 --- a/gcc/config/rs6000/xm-beos.h +++ b/gcc/config/rs6000/xm-beos.h @@ -31,10 +31,7 @@ Boston, MA 02111-1307, USA. */ #define HOST_WORDS_BIG_ENDIAN -/* Use the C alloca and use only int bitfields. */ - -#define USE_C_ALLOCA -extern void *alloca (); +/* Use only int bitfields. */ #define ONLY_INT_FIELDS /* use ANSI/SYSV style byte manipulation routines instead of BSD ones */ @@ -65,3 +62,9 @@ extern void *alloca (); /* SYSTEM_INCLUDE_DIR is the location for system specific, non-POSIX headers. */ #define SYSTEM_INCLUDE_DIR "/boot/develop/headers/be" + +/* This is a temporary hack until the wimpy default 64k stack + limit in BeOS is either increased or made user settable somehow. + This probably won't happen until after the DR9 release. */ +#undef USE_C_ALLOCA +#define USE_C_ALLOCA 1 diff --git a/gcc/config/rs6000/xm-rs6000.h b/gcc/config/rs6000/xm-rs6000.h index d14ffaf..a815a9d 100644 --- a/gcc/config/rs6000/xm-rs6000.h +++ b/gcc/config/rs6000/xm-rs6000.h @@ -28,14 +28,8 @@ Boston, MA 02111-1307, USA. */ #define HOST_WORDS_BIG_ENDIAN -/* If not compiled with GNU C, use the C alloca and use only int bitfields. */ +/* If not compiled with GNU C, use only int bitfields. */ #ifndef __GNUC__ -#define USE_C_ALLOCA -#if __STDC__ -extern void *alloca (); -#else -extern char *alloca (); -#endif #define ONLY_INT_FIELDS #endif diff --git a/gcc/config/rs6000/xm-sysv4.h b/gcc/config/rs6000/xm-sysv4.h index d35afed..25aecfe 100644 --- a/gcc/config/rs6000/xm-sysv4.h +++ b/gcc/config/rs6000/xm-sysv4.h @@ -34,14 +34,8 @@ Boston, MA 02111-1307, USA. */ #include "xm-linux.h" #endif -/* if not compiled with GNU C, use the C alloca and use only int bitfields. */ +/* if not compiled with GNU C, use only int bitfields. */ #ifndef __GNUC__ -#define USE_C_ALLOCA -#ifdef __STDC__ -extern void *alloca (); -#else -extern char *alloca (); -#endif #undef ONLY_INT_FIELDS #define ONLY_INT_FIELDS #endif diff --git a/gcc/config/sh/xm-sh.h b/gcc/config/sh/xm-sh.h index 6802553..9c7bdfd 100644 --- a/gcc/config/sh/xm-sh.h +++ b/gcc/config/sh/xm-sh.h @@ -23,8 +23,3 @@ Boston, MA 02111-1307, USA. */ #define HOST_BITS_PER_SHORT 16 #define HOST_BITS_PER_INT 32 #define HOST_BITS_PER_LONG 32 - -/* If compiled with GNU C, use the built-in alloca. */ -#ifdef __GNUC__ -#define alloca __builtin_alloca -#endif diff --git a/gcc/config/sparc/x-sysv4 b/gcc/config/sparc/x-sysv4 index 2a661e3..71eaec6 100644 --- a/gcc/config/sparc/x-sysv4 +++ b/gcc/config/sparc/x-sysv4 @@ -1,2 +1 @@ X_CFLAGS=-DSVR4 -ALLOCA=alloca.o diff --git a/gcc/config/sparc/xm-linux.h b/gcc/config/sparc/xm-linux.h index 691c7d1..f348105 100644 --- a/gcc/config/sparc/xm-linux.h +++ b/gcc/config/sparc/xm-linux.h @@ -1,5 +1,5 @@ /* Configuration for GCC for SPARC running Linux-based GNU systems. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. Contributed by Eddie C. Dost (ecd@skynet.be) This file is part of GNU CC. @@ -20,7 +20,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef inhibit_libc -#include <alloca.h> #include <stdlib.h> #include <string.h> #endif diff --git a/gcc/config/sparc/xm-pbd.h b/gcc/config/sparc/xm-pbd.h index a277aad..3dc4b73 100644 --- a/gcc/config/sparc/xm-pbd.h +++ b/gcc/config/sparc/xm-pbd.h @@ -3,7 +3,3 @@ #include "sparc/xm-sparc.h" #define USG - -#ifndef __GNUC__ -#define USE_C_ALLOCA -#endif diff --git a/gcc/config/sparc/xm-sol2.h b/gcc/config/sparc/xm-sol2.h deleted file mode 100644 index 5613b08..0000000 --- a/gcc/config/sparc/xm-sol2.h +++ /dev/null @@ -1,4 +0,0 @@ -/* If not compiled with GNU C, include the system's <alloca.h> header. */ -#ifndef __GNUC__ -#include <alloca.h> -#endif diff --git a/gcc/config/sparc/xm-sparc.h b/gcc/config/sparc/xm-sparc.h index 6432457..23cafdc 100644 --- a/gcc/config/sparc/xm-sparc.h +++ b/gcc/config/sparc/xm-sparc.h @@ -29,8 +29,3 @@ Boston, MA 02111-1307, USA. */ /* Doubles are stored in memory with the high order word first. This matters when cross-compiling. */ #define HOST_WORDS_BIG_ENDIAN 1 - -/* If compiled with Sun CC, the use of alloca requires this #include. */ -#ifndef __GNUC__ -#include "alloca.h" -#endif diff --git a/gcc/config/vax/xm-vms.h b/gcc/config/vax/xm-vms.h index d5af89f..bdba628 100644 --- a/gcc/config/vax/xm-vms.h +++ b/gcc/config/vax/xm-vms.h @@ -116,7 +116,6 @@ Boston, MA 02111-1307, USA. */ /* Customizations/kludges for building with DEC's VAX C compiler rather than GCC. */ -#define USE_C_ALLOCA /* using alloca.c */ #define QSORT_WORKAROUND /* do not use VAXCRTL's qsort */ /* use ANSI/SYSV style byte manipulation routines instead of BSD ones */ @@ -172,14 +171,5 @@ Boston, MA 02111-1307, USA. */ #pragma message disable (undefescap) #endif -#if defined(USE_C_ALLOCA) && !defined(alloca) -/* Declare alloca() using similar logic to that in alloca.c. */ -#ifdef __STDC__ -extern void *alloca(unsigned); -#else -extern char *alloca(); -#endif -#endif - #define OBJECT_SUFFIX ".obj" #define EXECUTABLE_SUFFIX ".exe" diff --git a/gcc/config/we32k/x-we32k b/gcc/config/we32k/x-we32k deleted file mode 100644 index 3375d42..0000000 --- a/gcc/config/we32k/x-we32k +++ /dev/null @@ -1 +0,0 @@ -ALLOCA=alloca.o diff --git a/gcc/config/x-interix b/gcc/config/x-interix index afdfe76..30606a3 100644 --- a/gcc/config/x-interix +++ b/gcc/config/x-interix @@ -1,11 +1,6 @@ # These are host overrides # From config dir -# Interix doesn't yet have alloca; it's better to use the portable C version for -# bootstrapping. Do this by defining ALLOCA. - -ALLOCA = alloca.o - # See all the declarations. FIXPROTO_DEFINES = -D_XOPEN_SOURCE diff --git a/gcc/config/x-svr4 b/gcc/config/x-svr4 index 9c70543..ce50fe9 100644 --- a/gcc/config/x-svr4 +++ b/gcc/config/x-svr4 @@ -1,9 +1,2 @@ -# Some versions of SVR4 have an alloca in /usr/ucblib/libucb.a, and if we are -# careful to link that in after libc we can use it, but since newer versions of -# SVR4 are dropping libucb, it is better to just use the portable C version for -# bootstrapping. Do this by defining ALLOCA. - -ALLOCA = alloca.o - # See all the declarations. FIXPROTO_DEFINES = -D_XOPEN_SOURCE diff --git a/gcc/config/xm-alloca.h b/gcc/config/xm-alloca.h deleted file mode 100644 index 3dbdc37..0000000 --- a/gcc/config/xm-alloca.h +++ /dev/null @@ -1,4 +0,0 @@ -/* If not compiled with GNU C, use the portable alloca. */ -#ifndef __GNUC__ -#define USE_C_ALLOCA -#endif diff --git a/gcc/config/xm-interix.h b/gcc/config/xm-interix.h index d3b9b27..4ba9a29 100644 --- a/gcc/config/xm-interix.h +++ b/gcc/config/xm-interix.h @@ -31,11 +31,6 @@ Boston, MA 02111-1307, USA. */ #endif #endif -/* If not compiled with GNU C, use the portable alloca. */ -#ifndef __GNUC__ -#define USE_C_ALLOCA 1 -#endif - /* Our strategy for finding global constructors is a bit different, although not a lot. */ #define DO_GLOBAL_CTORS_BODY \ diff --git a/gcc/config/xm-openbsd.h b/gcc/config/xm-openbsd.h index b18e7fe..27ddfc5 100644 --- a/gcc/config/xm-openbsd.h +++ b/gcc/config/xm-openbsd.h @@ -27,8 +27,3 @@ Boston, MA 02111-1307, USA. */ problems that may occur with gcc's interpretation. */ #undef POSIX #define POSIX - -/* Ensure we get gnu C's defaults. */ -#ifdef __GNUC__ -#define alloca __builtin_alloca -#endif diff --git a/gcc/configure b/gcc/configure index 43c077b..8d5fc97 100755 --- a/gcc/configure +++ b/gcc/configure @@ -4400,257 +4400,23 @@ EOF fi -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:4407: checking for working alloca.h" >&5 -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 4412 "configure" -#include "confdefs.h" -#include <alloca.h> -int main() { -char *p = alloca(2 * sizeof(int)); -; return 0; } -EOF -if { (eval echo configure:4419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_header_alloca_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_alloca_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 -if test $ac_cv_header_alloca_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA_H 1 -EOF - -fi - -echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:4440: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 4445 "configure" -#include "confdefs.h" - -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include <malloc.h> -# define alloca _alloca -# else -# if HAVE_ALLOCA_H -# include <alloca.h> -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - -int main() { -char *p = (char *) alloca(1); -; return 0; } -EOF -if { (eval echo configure:4473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_alloca_works=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_alloca_works=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 -if test $ac_cv_func_alloca_works = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA 1 -EOF - -fi - -if test $ac_cv_func_alloca_works = no; then - # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.${ac_objext} - cat >> confdefs.h <<\EOF -#define C_ALLOCA 1 -EOF - - -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4505: checking whether alloca needs Cray hooks" >&5 -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 4510 "configure" -#include "confdefs.h" -#if defined(CRAY) && ! defined(CRAY2) -webecray -#else -wenotbecray -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "webecray" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_os_cray=yes -else - rm -rf conftest* - ac_cv_os_cray=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_os_cray" 1>&6 -if test $ac_cv_os_cray = yes; then -for ac_func in _getb67 GETB67 getb67; do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4535: checking for $ac_func" >&5 -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 4540 "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. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* 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 echo configure:4563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - 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 - cat >> confdefs.h <<EOF -#define CRAY_STACKSEG_END $ac_func -EOF - - break -else - echo "$ac_t""no" 1>&6 -fi - -done -fi - -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4590: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 -else - cat > conftest.$ac_ext <<EOF -#line 4598 "configure" -#include "confdefs.h" -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} -main () -{ - exit (find_stack_direction() < 0); -} -EOF -if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_c_stack_direction=1 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_stack_direction=-1 -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 -cat >> confdefs.h <<EOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -EOF - -fi - - + for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4644: checking for $ac_hdr" >&5 +echo "configure:4410: checking for $ac_hdr" >&5 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 4649 "configure" +#line 4415 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4680,12 +4446,12 @@ done strdup __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4684: checking for $ac_func" >&5 +echo "configure:4450: checking for $ac_func" >&5 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 4689 "configure" +#line 4455 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4708,7 +4474,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4737,12 +4503,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4741: checking for $ac_func" >&5 +echo "configure:4507: checking for $ac_func" >&5 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 4746 "configure" +#line 4512 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4765,7 +4531,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4799,19 +4565,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:4803: checking for LC_MESSAGES" >&5 +echo "configure:4569: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4808 "configure" +#line 4574 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -4832,7 +4598,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:4836: checking whether NLS is requested" >&5 +echo "configure:4602: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -4852,7 +4618,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:4856: checking whether included gettext is requested" >&5 +echo "configure:4622: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -4871,17 +4637,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:4875: checking for libintl.h" >&5 +echo "configure:4641: checking for libintl.h" >&5 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 4880 "configure" +#line 4646 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4898,19 +4664,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:4902: checking for gettext in libc" >&5 +echo "configure:4668: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4907 "configure" +#line 4673 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:4914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -4926,7 +4692,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:4930: checking for bindtextdomain in -lintl" >&5 +echo "configure:4696: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4934,7 +4700,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4938 "configure" +#line 4704 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4945,7 +4711,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:4949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4961,12 +4727,12 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:4965: checking for gettext in libintl" >&5 +echo "configure:4731: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 -echo "configure:4970: checking for gettext in -lintl" >&5 +echo "configure:4736: checking for gettext in -lintl" >&5 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4974,7 +4740,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4978 "configure" +#line 4744 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4985,7 +4751,7 @@ int main() { gettext() ; return 0; } EOF -if { (eval echo configure:4989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5028,7 +4794,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5032: checking for $ac_word" >&5 +echo "configure:4798: checking for $ac_word" >&5 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5062,12 +4828,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5066: checking for $ac_func" >&5 +echo "configure:4832: checking for $ac_func" >&5 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 5071 "configure" +#line 4837 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5090,7 +4856,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5117,7 +4883,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5121: checking for $ac_word" >&5 +echo "configure:4887: checking for $ac_word" >&5 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5153,7 +4919,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5157: checking for $ac_word" >&5 +echo "configure:4923: checking for $ac_word" >&5 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5185,7 +4951,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 5189 "configure" +#line 4955 "configure" #include "confdefs.h" int main() { @@ -5193,7 +4959,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -5218,7 +4984,7 @@ fi if test "$CATOBJEXT" = "NONE"; then echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 -echo "configure:5222: checking whether catgets can be used" >&5 +echo "configure:4988: checking whether catgets can be used" >&5 # Check whether --with-catgets or --without-catgets was given. if test "${with_catgets+set}" = set; then withval="$with_catgets" @@ -5231,7 +4997,7 @@ fi if test "$nls_cv_use_catgets" = "yes"; then echo $ac_n "checking for main in -li""... $ac_c" 1>&6 -echo "configure:5235: checking for main in -li" >&5 +echo "configure:5001: checking for main in -li" >&5 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5239,14 +5005,14 @@ else ac_save_LIBS="$LIBS" LIBS="-li $LIBS" cat > conftest.$ac_ext <<EOF -#line 5243 "configure" +#line 5009 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5274,12 +5040,12 @@ else fi echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:5278: checking for catgets" >&5 +echo "configure:5044: checking for catgets" >&5 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5283 "configure" +#line 5049 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char catgets(); below. */ @@ -5302,7 +5068,7 @@ catgets(); ; return 0; } EOF -if { (eval echo configure:5306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_catgets=yes" else @@ -5324,7 +5090,7 @@ EOF # Extract the first word of "gencat", so it can be a program name with args. set dummy gencat; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5328: checking for $ac_word" >&5 +echo "configure:5094: checking for $ac_word" >&5 if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5360,7 +5126,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5364: checking for $ac_word" >&5 +echo "configure:5130: checking for $ac_word" >&5 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5397,7 +5163,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5401: checking for $ac_word" >&5 +echo "configure:5167: checking for $ac_word" >&5 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5435,7 +5201,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5439: checking for $ac_word" >&5 +echo "configure:5205: checking for $ac_word" >&5 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5493,7 +5259,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5497: checking for $ac_word" >&5 +echo "configure:5263: checking for $ac_word" >&5 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5527,7 +5293,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5531: checking for $ac_word" >&5 +echo "configure:5297: checking for $ac_word" >&5 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5566,7 +5332,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5570: checking for $ac_word" >&5 +echo "configure:5336: checking for $ac_word" >&5 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5665,7 +5431,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:5669: checking for catalogs to be installed" >&5 +echo "configure:5435: checking for catalogs to be installed" >&5 if test "x$LINGUAS" = "x"; then LINGUAS=$ALL_LINGUAS else @@ -5697,17 +5463,17 @@ echo "configure:5669: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:5701: checking for linux/version.h" >&5 +echo "configure:5467: checking for linux/version.h" >&5 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 5706 "configure" +#line 5472 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5782,7 +5548,7 @@ fi echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 -echo "configure:5786: checking whether windows registry support is requested" >&5 +echo "configure:5552: checking whether windows registry support is requested" >&5 if test x$enable_win32_registry != xno; then cat >> confdefs.h <<\EOF #define ENABLE_WIN32_REGISTRY 1 @@ -5811,7 +5577,7 @@ esac if test x$enable_win32_registry != xno; then echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 -echo "configure:5815: checking registry key on windows hosts" >&5 +echo "configure:5581: checking registry key on windows hosts" >&5 cat >> confdefs.h <<EOF #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" EOF @@ -5991,7 +5757,7 @@ fi # Figure out what assembler we will be using. echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 -echo "configure:5995: checking what assembler to use" >&5 +echo "configure:5761: checking what assembler to use" >&5 gcc_cv_as= gcc_cv_gas_major_version= gcc_cv_gas_minor_version= @@ -6076,7 +5842,7 @@ fi # Figure out what nm we will be using. echo $ac_n "checking what nm to use""... $ac_c" 1>&6 -echo "configure:6080: checking what nm to use" >&5 +echo "configure:5846: checking what nm to use" >&5 if test -x nm$host_exeext; then gcc_cv_nm=./nm$host_exeext elif test x$host = x$target; then @@ -6087,7 +5853,7 @@ echo "$ac_t""$gcc_cv_nm" 1>&6 # Figure out what assembler alignment features are present. echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 -echo "configure:6091: checking assembler alignment features" >&5 +echo "configure:5857: checking assembler alignment features" >&5 gcc_cv_as_alignment_features=none if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then # Gas version 2.6 and later support for .balign and .p2align. @@ -6135,7 +5901,7 @@ fi echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 -echo "configure:6139: checking assembler subsection support" >&5 +echo "configure:5905: checking assembler subsection support" >&5 gcc_cv_as_subsections=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then @@ -6175,7 +5941,7 @@ fi echo "$ac_t""$gcc_cv_as_subsections" 1>&6 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 -echo "configure:6179: checking assembler weak support" >&5 +echo "configure:5945: checking assembler weak support" >&5 gcc_cv_as_weak=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then @@ -6198,7 +5964,7 @@ fi echo "$ac_t""$gcc_cv_as_weak" 1>&6 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 -echo "configure:6202: checking assembler hidden support" >&5 +echo "configure:5968: checking assembler hidden support" >&5 gcc_cv_as_hidden=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then @@ -6224,7 +5990,7 @@ echo "$ac_t""$gcc_cv_as_hidden" 1>&6 case "$target" in sparc*-*-*) echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 -echo "configure:6228: checking assembler .register pseudo-op support" >&5 +echo "configure:5994: checking assembler .register pseudo-op support" >&5 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6252,7 +6018,7 @@ EOF fi echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 -echo "configure:6256: checking assembler supports -relax" >&5 +echo "configure:6022: checking assembler supports -relax" >&5 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6282,7 +6048,7 @@ EOF case "$tm_file" in *64*) echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6 -echo "configure:6286: checking for 64 bit support in assembler ($gcc_cv_as)" >&5 +echo "configure:6052: checking for 64 bit support in assembler ($gcc_cv_as)" >&5 if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6327,7 +6093,7 @@ EOF if test "x$gcc_cv_as_flags64" != xno; then echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 -echo "configure:6331: checking for assembler offsetable %lo() support" >&5 +echo "configure:6097: checking for assembler offsetable %lo() support" >&5 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6366,7 +6132,7 @@ EOF i[34567]86-*-*) echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 -echo "configure:6370: checking assembler instructions" >&5 +echo "configure:6136: checking assembler instructions" >&5 gcc_cv_as_instructions= if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then @@ -6395,7 +6161,7 @@ EOF esac echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 -echo "configure:6399: checking assembler dwarf2 debug_line support" >&5 +echo "configure:6165: checking assembler dwarf2 debug_line support" >&5 gcc_cv_as_dwarf2_debug_line=no # ??? Not all targets support dwarf2 debug_line, even within a version # of gas. Moreover, we need to emit a valid instruction to trigger any @@ -6541,7 +6307,7 @@ EOF echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:6545: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:6311: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -7049,7 +6815,6 @@ s%@objext@%$objext%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g s%@CHECK_PO@%$CHECK_PO%g -s%@ALLOCA@%$ALLOCA%g s%@USE_NLS@%$USE_NLS%g s%@MSGFMT@%$MSGFMT%g s%@GMSGFMT@%$GMSGFMT%g diff --git a/gcc/genattr.c b/gcc/genattr.c index 27123d8..bb7ccbf 100644 --- a/gcc/genattr.c +++ b/gcc/genattr.c @@ -279,11 +279,9 @@ from the machine description file `md'. */\n\n"); if (unit == 0) { - int len = strlen (name) + 1; unit = (struct function_unit *) - alloca (sizeof (struct function_unit)); - unit->name = (char *) alloca (len); - memcpy (unit->name, name, len); + xmalloc (sizeof (struct function_unit)); + unit->name = xstrdup (name); unit->multiplicity = multiplicity; unit->simultaneity = simultaneity; unit->ready_cost.min = unit->ready_cost.max = ready_cost; diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index c69ad53..aecd27c 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -749,7 +749,7 @@ attr_printf VPARAMS ((register int len, const char *fmt, ...)) const char *fmt; #endif va_list p; - register char *str; + char str[256]; VA_START (p, fmt); @@ -758,8 +758,9 @@ attr_printf VPARAMS ((register int len, const char *fmt, ...)) fmt = va_arg (p, const char *); #endif - /* Print the string into a temporary location. */ - str = (char *) alloca (len); + if (len > 255) /* leave room for \0 */ + abort (); + vsprintf (str, fmt, p); va_end (p); @@ -1983,12 +1984,12 @@ expand_units () /* Create an array of ops for each unit. Add an extra unit for the result_ready_cost function that has the ops of all other units. */ unit_ops = (struct function_unit_op ***) - alloca ((num_units + 1) * sizeof (struct function_unit_op **)); + xmalloc ((num_units + 1) * sizeof (struct function_unit_op **)); unit_num = (struct function_unit **) - alloca ((num_units + 1) * sizeof (struct function_unit *)); + xmalloc ((num_units + 1) * sizeof (struct function_unit *)); unit_num[num_units] = unit = (struct function_unit *) - alloca (sizeof (struct function_unit)); + xmalloc (sizeof (struct function_unit)); unit->num = num_units; unit->num_opclasses = 0; @@ -1997,7 +1998,7 @@ expand_units () unit_num[num_units]->num_opclasses += unit->num_opclasses; unit_num[unit->num] = unit; unit_ops[unit->num] = op_array = (struct function_unit_op **) - alloca (unit->num_opclasses * sizeof (struct function_unit_op *)); + xmalloc (unit->num_opclasses * sizeof (struct function_unit_op *)); for (op = unit->ops; op; op = op->next) op_array[op->num] = op; @@ -2005,7 +2006,7 @@ expand_units () /* Compose the array of ops for the extra unit. */ unit_ops[num_units] = op_array = (struct function_unit_op **) - alloca (unit_num[num_units]->num_opclasses + xmalloc (unit_num[num_units]->num_opclasses * sizeof (struct function_unit_op *)); for (unit = units, i = 0; unit; i += unit->num_opclasses, unit = unit->next) @@ -2571,9 +2572,10 @@ simplify_cond (exp, insn_code, insn_index) rtx defval = XEXP (exp, 1); rtx new_defval = XEXP (exp, 1); int len = XVECLEN (exp, 0); - rtx *tests = (rtx *) alloca (len * sizeof (rtx)); + rtx *tests = (rtx *) xmalloc (len * sizeof (rtx)); int allsame = 1; char *first_spacer; + rtx ret; /* This lets us free all storage allocated below, if appropriate. */ first_spacer = (char *) obstack_finish (rtl_obstack); @@ -2656,11 +2658,12 @@ simplify_cond (exp, insn_code, insn_index) if (len == 0) { if (GET_CODE (defval) == COND) - return simplify_cond (defval, insn_code, insn_index); - return defval; + ret = simplify_cond (defval, insn_code, insn_index); + else + ret = defval; } else if (allsame) - return exp; + ret = exp; else { rtx newexp = rtx_alloc (COND); @@ -2668,8 +2671,10 @@ simplify_cond (exp, insn_code, insn_index) XVEC (newexp, 0) = rtvec_alloc (len); memcpy (XVEC (newexp, 0)->elem, tests, len * sizeof (rtx)); XEXP (newexp, 1) = new_defval; - return newexp; + ret = newexp; } + free (tests); + return ret; } /* Remove an insn entry from an attribute value. */ @@ -2864,13 +2869,15 @@ evaluate_eq_attr (exp, value, insn_code, insn_index) } else if (GET_CODE (value) == SYMBOL_REF) { - char *p, *string; + char *p; + char string[256]; if (GET_CODE (exp) != EQ_ATTR) abort (); - string = (char *) alloca (2 + strlen (XSTR (exp, 0)) - + strlen (XSTR (exp, 1))); + if (strlen (XSTR (exp, 0)) + strlen (XSTR (exp, 1)) + 2 > 256) + abort (); + strcpy (string, XSTR (exp, 0)); strcat (string, "_"); strcat (string, XSTR (exp, 1)); @@ -3513,7 +3520,7 @@ optimize_attrs () /* Make 2 extra elements, for "code" values -2 and -1. */ insn_code_values - = (struct attr_value_list **) alloca ((insn_code_number + 2) + = (struct attr_value_list **) xmalloc ((insn_code_number + 2) * sizeof (struct attr_value_list *)); memset ((char *) insn_code_values, 0, (insn_code_number + 2) * sizeof (struct attr_value_list *)); @@ -3521,9 +3528,6 @@ optimize_attrs () /* Offset the table address so we can index by -2 or -1. */ insn_code_values += 2; - /* Allocate the attr_value_list structures using xmalloc rather than - alloca, because using alloca can overflow the maximum permitted - stack limit on SPARC Lynx. */ iv = ivbuf = ((struct attr_value_list *) xmalloc (num_insn_ents * sizeof (struct attr_value_list))); @@ -3593,6 +3597,7 @@ optimize_attrs () } free (ivbuf); + free (insn_code_values - 2); } #if 0 @@ -3641,6 +3646,7 @@ simplify_by_exploding (exp) rtx *condtest, *condval; int i, j, total, ndim = 0; int most_tests, num_marks, new_marks; + rtx ret; /* Locate all the EQ_ATTR expressions. */ if (! find_and_mark_used_attributes (exp, &list, &ndim) || ndim == 0) @@ -3655,7 +3661,7 @@ simplify_by_exploding (exp) cover the domain of the attribute. This makes the expanded COND form order independent. */ - space = (struct dimension *) alloca (ndim * sizeof (struct dimension)); + space = (struct dimension *) xmalloc (ndim * sizeof (struct dimension)); total = 1; for (ndim = 0; list; ndim++) @@ -3710,8 +3716,8 @@ simplify_by_exploding (exp) for (i = 0; i < ndim; i++) space[i].current_value = space[i].values; - condtest = (rtx *) alloca (total * sizeof (rtx)); - condval = (rtx *) alloca (total * sizeof (rtx)); + condtest = (rtx *) xmalloc (total * sizeof (rtx)); + condval = (rtx *) xmalloc (total * sizeof (rtx)); /* Expand the tests and values by iterating over all values in the attribute space. */ @@ -3727,6 +3733,7 @@ simplify_by_exploding (exp) /* We are now finished with the original expression. */ unmark_used_attributes (0, space, ndim); + free (space); /* Find the most used constant value and make that the default. */ most_tests = -1; @@ -3753,27 +3760,32 @@ simplify_by_exploding (exp) /* Give up if nothing is constant. */ if (num_marks == 0) - return exp; - + ret = exp; + /* If all values are the default, use that. */ - if (total == most_tests) - return defval; + else if (total == most_tests) + ret = defval; /* Make a COND with the most common constant value the default. (A more complex method where tests with the same value were combined didn't seem to improve things.) */ - condexp = rtx_alloc (COND); - XVEC (condexp, 0) = rtvec_alloc ((total - most_tests) * 2); - XEXP (condexp, 1) = defval; - for (i = j = 0; i < total; i++) - if (condval[i] != defval) - { - XVECEXP (condexp, 0, 2 * j) = condtest[i]; - XVECEXP (condexp, 0, 2 * j + 1) = condval[i]; - j++; - } - - return condexp; + else + { + condexp = rtx_alloc (COND); + XVEC (condexp, 0) = rtvec_alloc ((total - most_tests) * 2); + XEXP (condexp, 1) = defval; + for (i = j = 0; i < total; i++) + if (condval[i] != defval) + { + XVECEXP (condexp, 0, 2 * j) = condtest[i]; + XVECEXP (condexp, 0, 2 * j + 1) = condval[i]; + j++; + } + ret = condexp; + } + free (condtest); + free (condval); + return ret; } /* Set the MEM_VOLATILE_P flag for all EQ_ATTR expressions in EXP and @@ -5677,7 +5689,7 @@ write_complex_function (unit, name, connection) struct attr_desc *case_attr, *attr; struct attr_value *av, *common_av; rtx value; - char *str; + char str[256]; int using_case; int i; @@ -5694,7 +5706,8 @@ write_complex_function (unit, name, connection) printf (" {\n"); /* Write the `switch' statement to get the case value. */ - str = (char *) alloca (strlen (unit->name) + strlen (name) + strlen (connection) + 10); + if (strlen (unit->name) + sizeof "*_cases" > 256) + abort (); sprintf (str, "*%s_cases", unit->name); case_attr = find_attr (str, 0); if (! case_attr) @@ -6048,18 +6061,6 @@ main (argc, argv) if (argc <= 1) fatal ("No input file name."); -#if defined (RLIMIT_STACK) && defined (HAVE_GETRLIMIT) && defined (HAVE_SETRLIMIT) - /* Get rid of any avoidable limit on stack size. */ - { - struct rlimit rlim; - - /* Set the stack limit huge so that alloca does not fail. */ - getrlimit (RLIMIT_STACK, &rlim); - rlim.rlim_cur = rlim.rlim_max; - setrlimit (RLIMIT_STACK, &rlim); - } -#endif - if (init_md_reader (argv[1]) != SUCCESS_EXIT_CODE) return (FATAL_EXIT_CODE); diff --git a/gcc/genextract.c b/gcc/genextract.c index 76cde0e..7c8ecfe 100644 --- a/gcc/genextract.c +++ b/gcc/genextract.c @@ -120,7 +120,7 @@ gen_insn (insn) else for (i = XVECLEN (insn, 1) - 1; i >= 0; i--) { - char *path = (char *) alloca (2); + char path[2]; path[0] = 'a' + i; path[1] = 0; @@ -221,7 +221,7 @@ walk_rtx (x, path) dupnums[dup_count] = XINT (x, 0); dup_count++; - newpath = (char *) alloca (depth + 2); + newpath = (char *) xmalloc (depth + 2); strcpy (newpath, path); newpath[depth + 1] = 0; @@ -230,13 +230,14 @@ walk_rtx (x, path) newpath[depth] = '0' + i; walk_rtx (XVECEXP (x, 1, i), newpath); } + free (newpath); return; case MATCH_OPERATOR: oplocs[XINT (x, 0)] = xstrdup (path); op_count = MAX (op_count, XINT (x, 0) + 1); - newpath = (char *) alloca (depth + 2); + newpath = (char *) xmalloc (depth + 2); strcpy (newpath, path); newpath[depth + 1] = 0; @@ -245,13 +246,14 @@ walk_rtx (x, path) newpath[depth] = '0' + i; walk_rtx (XVECEXP (x, 2, i), newpath); } + free (newpath); return; case MATCH_PARALLEL: oplocs[XINT (x, 0)] = xstrdup (path); op_count = MAX (op_count, XINT (x, 0) + 1); - newpath = (char *) alloca (depth + 2); + newpath = (char *) xmalloc (depth + 2); strcpy (newpath, path); newpath[depth + 1] = 0; @@ -260,6 +262,7 @@ walk_rtx (x, path) newpath[depth] = 'a' + i; walk_rtx (XVECEXP (x, 2, i), newpath); } + free (newpath); return; case ADDRESS: @@ -270,7 +273,7 @@ walk_rtx (x, path) break; } - newpath = (char *) alloca (depth + 2); + newpath = (char *) xmalloc (depth + 2); strcpy (newpath, path); newpath[depth + 1] = 0; @@ -293,6 +296,7 @@ walk_rtx (x, path) } } } + free (newpath); } /* Given a PATH, representing a path down the instruction's diff --git a/gcc/genoutput.c b/gcc/genoutput.c index dc36d46..c10b8e5 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -241,13 +241,14 @@ output_prologue () /* We need to define all predicates used. Keep a list of those we have defined so far. There normally aren't very many predicates used, so a linked list should be fast enough. */ +struct predicate { const char *name; struct predicate *next; }; static void output_predicate_decls () { - struct predicate { const char *name; struct predicate *next; } *predicates = 0; + struct predicate *predicates = 0; register struct operand_data *d; - struct predicate *p; + struct predicate *p, *next; for (d = odata; d; d = d->next) if (d->predicate && d->predicate[0]) @@ -260,7 +261,7 @@ output_predicate_decls () { printf ("extern int %s PARAMS ((rtx, enum machine_mode));\n", d->predicate); - p = (struct predicate *) alloca (sizeof (struct predicate)); + p = (struct predicate *) xmalloc (sizeof (struct predicate)); p->name = d->predicate; p->next = predicates; predicates = p; @@ -268,6 +269,11 @@ output_predicate_decls () } printf ("\n\n"); + for (p = predicates; p; p = next) + { + next = p->next; + free (p); + } } static void diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 2856fe6..2224f80 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -766,7 +766,7 @@ add_to_sequence (pattern, last, position, insn_type, top) if (depth > max_depth) max_depth = depth; - subpos = (char *) alloca (depth + 2); + subpos = (char *) xmalloc (depth + 2); strcpy (subpos, position); subpos[depth + 1] = 0; @@ -796,7 +796,7 @@ add_to_sequence (pattern, last, position, insn_type, top) last, subpos, insn_type, 0); last = &sub->success; } - return sub; + goto ret; } /* Else nothing special. */ @@ -1027,6 +1027,8 @@ add_to_sequence (pattern, last, position, insn_type, top) if (this->tests == NULL) abort (); + ret: + free (subpos); return sub; } @@ -997,7 +997,7 @@ rtx read_rtx (infile) FILE *infile; { - register int i, j, list_counter; + register int i, j; RTX_CODE tmp_code; register const char *format_ptr; /* tmp_char is a buffer used for reading decimal integers @@ -1111,40 +1111,31 @@ again: case 'E': { - register struct rtx_list *next_rtx, *rtx_list_link; - struct rtx_list *list_rtx = NULL; + /* Obstack to store scratch vector in. */ + struct obstack vector_stack; + int list_counter = 0; + rtvec return_vec = NULL_RTVEC; c = read_skip_spaces (infile); if (c != '[') fatal_expected_char (infile, '[', c); /* add expressions to a list, while keeping a count */ - next_rtx = NULL; - list_counter = 0; + obstack_init (&vector_stack); while ((c = read_skip_spaces (infile)) && c != ']') { ungetc (c, infile); list_counter++; - rtx_list_link = (struct rtx_list *) - alloca (sizeof (struct rtx_list)); - rtx_list_link->value = read_rtx (infile); - if (next_rtx == 0) - list_rtx = rtx_list_link; - else - next_rtx->next = rtx_list_link; - next_rtx = rtx_list_link; - rtx_list_link->next = 0; + obstack_ptr_grow (&vector_stack, (PTR) read_rtx (infile)); } - /* get vector length and allocate it */ - XVEC (return_rtx, i) = (list_counter - ? rtvec_alloc (list_counter) : NULL_RTVEC); if (list_counter > 0) { - next_rtx = list_rtx; - for (j = 0; j < list_counter; j++, - next_rtx = next_rtx->next) - XVECEXP (return_rtx, i, j) = next_rtx->value; + return_vec = rtvec_alloc (list_counter); + memcpy (&return_vec->elem[0], obstack_finish (&vector_stack), + list_counter * sizeof (rtx)); } + XVEC (return_rtx, i) = return_vec; + obstack_free (&vector_stack, NULL); /* close bracket gotten */ } break; diff --git a/gcc/system.h b/gcc/system.h index 589e344..8721f7e 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -112,11 +112,6 @@ extern int errno; #ifdef HAVE_STDLIB_H # include <stdlib.h> -# ifdef USE_C_ALLOCA -/* Note that systems that use glibc have a <stdlib.h> that includes - <alloca.h> that defines alloca, so let USE_C_ALLOCA override this. */ -# undef alloca -#endif #endif /* If we don't have an overriding definition, set SUCCESS_EXIT_CODE and @@ -552,11 +547,6 @@ extern void abort PARAMS ((void)); #define UNION_INIT_ZERO #endif -/* GCC now gives implicit declaration warnings for undeclared builtins. */ -#if defined(__GNUC__) && defined (__SIZE_TYPE__) -extern void *alloca (__SIZE_TYPE__); -#endif - /* Various error reporting routines want to use __FUNCTION__. */ #if (GCC_VERSION < 2007) #ifndef __FUNCTION__ diff --git a/include/libiberty.h b/include/libiberty.h index 64d072b..e4fc2af 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -206,6 +206,20 @@ extern int vasprintf PARAMS ((char **, const char *, va_list)) #define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) +/* Drastically simplified alloca configurator. If we're using GCC, + we use __builtin_alloca; otherwise we use the C alloca. The C + alloca is always available. You can override GCC by defining + USE_C_ALLOCA yourself. */ +extern PTR C_alloca PARAMS((size_t)); +#undef alloca +#if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA +# define alloca(x) __builtin_alloca(x) +#else +# define alloca(x) C_alloca(x) +# undef USE_C_ALLOCA +# define USE_C_ALLOCA 1 +#endif + #ifdef __cplusplus } #endif diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in index 0eab5a6..5ea3bd5 100644 --- a/libiberty/Makefile.in +++ b/libiberty/Makefile.in @@ -64,7 +64,6 @@ MAKEOVERRIDES = TARGETLIB = libiberty.a LIBOBJS = @LIBOBJS@ -ALLOCA = @ALLOCA@ # A configuration can specify extra .o files that should be included, # even if they are in libc. (Perhaps the libc version is buggy.) @@ -118,9 +117,6 @@ install-info: install-info-subdir clean-info: clean-info-subdir dvi: dvi-subdir -# Include files that are in this directory. -HFILES = alloca-conf.h - # NOTE: If you add new files to the library, add them to this list # (alphabetical), and add them to REQUIRED_OFILES or funcs in # configure.in. @@ -138,17 +134,17 @@ CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \ xmalloc.c xmemdup.c xstrdup.c xstrerror.c # These are always included in the library. -REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o cp-demangle.o \ - dyn-string.o fdmatch.o fnmatch.o getopt.o getopt1.o getpwd.o \ - getruntime.o hashtab.o hex.o floatformat.o md5.o objalloc.o obstack.o \ - partition.o pexecute.o safe-ctype.o sort.o spaces.o splay-tree.o \ - strerror.o strsignal.o xatexit.o xexit.o xmalloc.o xmemdup.o \ - xstrdup.o xstrerror.o - -$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA) +REQUIRED_OFILES = argv.o alloca.o choose-temp.o concat.o cplus-dem.o \ + cp-demangle.o dyn-string.o fdmatch.o fnmatch.o getopt.o getopt1.o \ + getpwd.o getruntime.o hashtab.o hex.o floatformat.o md5.o objalloc.o \ + obstack.o partition.o pexecute.o safe-ctype.o sort.o spaces.o \ + splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o \ + xmemdup.o xstrdup.o xstrerror.o + +$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) -rm -f $(TARGETLIB) $(AR) $(AR_FLAGS) $(TARGETLIB) \ - $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA) + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(RANLIB) $(TARGETLIB) INSTALL_DEST = @INSTALL_DEST@ @@ -197,8 +193,8 @@ stamp-picdir: etags tags: TAGS etags-subdir -TAGS: $(CFILES) $(HFILES) - etags `for i in $(HFILES) $(CFILES); do echo $(srcdir)/$$i ; done` +TAGS: $(CFILES) + etags `for i in $(CFILES); do echo $(srcdir)/$$i ; done` # The standalone demangler (c++filt) has been moved to binutils. demangle: @@ -207,7 +203,7 @@ demangle: @false ls: - @echo Makefile $(HFILES) $(CFILES) + @echo Makefile $(CFILES) # Need to deal with profiled libraries, too. @@ -243,7 +239,6 @@ stamp-h: config.in config.status config.status: $(srcdir)/configure $(srcdir)/config.table $(SHELL) ./config.status --recheck - all-subdir check-subdir installcheck-subdir info-subdir \ install-info-subdir clean-info-subdir dvi-subdir install-subdir \ etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \ @@ -254,11 +249,11 @@ maintainer-clean-subdir: cd $$dir && $(MAKE) $$target; \ done -$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA): stamp-picdir +$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS): stamp-picdir -alloca.o: config.h +alloca.o: config.h $(INCDIR)/libiberty.h atexit.o: config.h -argv.o: config.h alloca-conf.h $(INCDIR)/libiberty.h +argv.o: config.h $(INCDIR)/libiberty.h basename.o: $(INCDIR)/libiberty.h choose-temp.o: config.h clock.o: config.h diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 index c562835..7b1b677 100644 --- a/libiberty/aclocal.m4 +++ b/libiberty/aclocal.m4 @@ -134,3 +134,55 @@ define(AC_DEFINE_NOAUTOHEADER, [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1) EOF ]) + +# We always want a C version of alloca() compiled into libiberty, +# because native-compiler support for the real alloca is so !@#$% +# unreliable that GCC has decided to use it only when being compiled +# by GCC. This is the part of AC_FUNC_ALLOCA that calculates the +# information alloca.c needs. +AC_DEFUN(libiberty_AC_FUNC_C_ALLOCA, +[AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray, +[AC_EGREP_CPP(webecray, +[#if defined(CRAY) && ! defined(CRAY2) +webecray +#else +wenotbecray +#endif +], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + AC_CHECK_FUNC($ac_func, + [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func, + [Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP + systems. This function is required for alloca.c support on those + systems.]) break]) + done +fi + +AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, +[AC_TRY_RUN([find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +}], + ac_cv_c_stack_direction=1, + ac_cv_c_stack_direction=-1, + ac_cv_c_stack_direction=0)]) +AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction, + [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 + STACK_DIRECTION = 0 => direction of growth unknown]) +]) diff --git a/libiberty/alloca-conf.h b/libiberty/alloca-conf.h deleted file mode 100644 index 9c3eea3..0000000 --- a/libiberty/alloca-conf.h +++ /dev/null @@ -1,24 +0,0 @@ -#include "config.h" - -#if defined(__GNUC__) && !defined(C_ALLOCA) -# ifndef alloca -# define alloca __builtin_alloca -# endif -#else /* ! defined (__GNUC__) */ -# ifdef _AIX - #pragma alloca -# else -# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA) -# include <alloca.h> -# else /* ! defined (HAVE_ALLOCA_H) */ -# ifdef __STDC__ -extern PTR alloca (size_t); -# else /* ! defined (__STDC__) */ -extern PTR alloca (); -# endif /* ! defined (__STDC__) */ -# endif /* ! defined (HAVE_ALLOCA_H) */ -# ifdef _WIN32 -# include <malloc.h> -# endif -# endif /* ! defined (_AIX) */ -#endif /* ! defined (__GNUC__) */ diff --git a/libiberty/alloca.c b/libiberty/alloca.c index 0f8a215..bf105d8 100644 --- a/libiberty/alloca.c +++ b/libiberty/alloca.c @@ -25,6 +25,8 @@ #include <config.h> #endif +#include <libiberty.h> + #ifdef HAVE_STRING_H #include <string.h> #endif @@ -32,67 +34,20 @@ #include <stdlib.h> #endif -#ifdef emacs -#include "blockinput.h" -#endif - -/* If compiling with GCC 2, this file's not needed. Except of course if - the C alloca is explicitly requested. */ -#if defined (USE_C_ALLOCA) || !defined (__GNUC__) || __GNUC__ < 2 - -/* If someone has defined alloca as a macro, - there must be some other way alloca is supposed to work. */ -#ifndef alloca - -#ifdef emacs -#ifdef static -/* actually, only want this if static is defined as "" - -- this is for usg, in which emacs must undefine static - in order to make unexec workable - */ -#ifndef STACK_DIRECTION -you -lose --- must know STACK_DIRECTION at compile-time -#endif /* STACK_DIRECTION undefined */ -#endif /* static */ -#endif /* emacs */ - /* If your stack is a linked list of frames, you have to provide an "address metric" ADDRESS_FUNCTION macro. */ #if defined (CRAY) && defined (CRAY_STACKSEG_END) -long i00afunc (); +static long i00afunc (); #define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) #else #define ADDRESS_FUNCTION(arg) &(arg) #endif -#if __STDC__ -typedef void *pointer; -#else -typedef char *pointer; -#endif - #ifndef NULL #define NULL 0 #endif -/* Different portions of Emacs need to call different versions of - malloc. The Emacs executable needs alloca to call xmalloc, because - ordinary malloc isn't protected from input signals. On the other - hand, the utilities in lib-src need alloca to call malloc; some of - them are very simple, and don't have an xmalloc routine. - - Non-Emacs programs expect this to call use xmalloc. - - Callers below should use malloc. */ - -#ifndef emacs -#define malloc xmalloc -#endif -extern pointer malloc (); - /* Define STACK_DIRECTION if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. @@ -168,9 +123,9 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */ caller, but that method cannot be made to work for some implementations of C, for example under Gould's UTX/32. */ -pointer -alloca (size) - unsigned size; +PTR +C_alloca (size) + size_t size; { auto char probe; /* Probes stack depth: */ register char *depth = ADDRESS_FUNCTION (probe); @@ -186,17 +141,13 @@ alloca (size) { register header *hp; /* Traverses linked list. */ -#ifdef emacs - BLOCK_INPUT; -#endif - for (hp = last_alloca_header; hp != NULL;) if ((STACK_DIR > 0 && hp->h.deep > depth) || (STACK_DIR < 0 && hp->h.deep < depth)) { register header *np = hp->h.next; - free ((pointer) hp); /* Collect garbage. */ + free ((PTR) hp); /* Collect garbage. */ hp = np; /* -> next header. */ } @@ -204,10 +155,6 @@ alloca (size) break; /* Rest are not deeper. */ last_alloca_header = hp; /* -> last valid storage. */ - -#ifdef emacs - UNBLOCK_INPUT; -#endif } if (size == 0) @@ -216,7 +163,7 @@ alloca (size) /* Allocate combined header + user data storage. */ { - register pointer new = malloc (sizeof (header) + size); + register PTR new = xmalloc (sizeof (header) + size); /* Address of header. */ if (new == 0) @@ -229,7 +176,7 @@ alloca (size) /* User storage begins just after header. */ - return (pointer) ((char *) new + sizeof (header)); + return (PTR) ((char *) new + sizeof (header)); } } @@ -500,6 +447,3 @@ i00afunc (long address) #endif /* not CRAY2 */ #endif /* CRAY */ - -#endif /* no alloca */ -#endif /* not GCC version 2 */ diff --git a/libiberty/argv.c b/libiberty/argv.c index 7aec9c0..3588285 100644 --- a/libiberty/argv.c +++ b/libiberty/argv.c @@ -48,7 +48,6 @@ extern char *strdup (); /* Duplicate a string */ #endif /* __STDC__ */ -#include "alloca-conf.h" #ifndef NULL #define NULL 0 diff --git a/libiberty/config.in b/libiberty/config.in index 1fb946a..fa23f18 100644 --- a/libiberty/config.in +++ b/libiberty/config.in @@ -1,21 +1,8 @@ /* config.in. Generated automatically from configure.in by autoheader. */ -/* Define if using alloca.c. */ -#undef C_ALLOCA - /* Define to empty if the keyword does not work. */ #undef const -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -#undef CRAY_STACKSEG_END - -/* Define if you have alloca, as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define if you have <alloca.h> and it should be used (not on Ultrix). */ -#undef HAVE_ALLOCA_H - /* Define if you have a working `mmap' system call. */ #undef HAVE_MMAP @@ -34,15 +21,6 @@ /* Define if you need to in order for stat and other things to work. */ #undef _POSIX_SOURCE -/* If using the C implementation of alloca, 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 - STACK_DIRECTION = 0 => direction of growth unknown - */ -#undef STACK_DIRECTION - /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -250,3 +228,15 @@ /* Define if you have the sys_siglist variable. */ #undef HAVE_SYS_SIGLIST +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP + systems. This function is required for alloca.c support on those + systems. */ +#undef CRAY_STACKSEG_END + +/* 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 + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION + diff --git a/libiberty/config.table b/libiberty/config.table index ea3312b..fa892c0 100644 --- a/libiberty/config.table +++ b/libiberty/config.table @@ -6,7 +6,6 @@ case "${host}" in *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;; i370-*-opened*) frag=mh-openedition ;; i[345]86-*-windows*) frag=mh-windows ;; - *-*-beos*) frag=mh-beos ;; esac frags=$frag diff --git a/libiberty/config/mh-beos b/libiberty/config/mh-beos deleted file mode 100644 index 9b75e7d..0000000 --- a/libiberty/config/mh-beos +++ /dev/null @@ -1,7 +0,0 @@ -# Host makefile fragment for BeOS - -# This is a temporary hack until the wimpy default 64k stack -# limit in BeOS is either increased or made user settable somehow. -# This probably won't happen until after the DR9 release. - -EXTRA_OFILES = alloca.o diff --git a/libiberty/configure b/libiberty/configure index ca24ef9..6b0aa20 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -1771,8 +1771,7 @@ fi # For each of these functions, if the host does not provide the # function we want to put FN.o in LIBOBJS, and if the host does -# provide the function, we want to define HAVE_FN in config.h. Also, -# if the host does not provide alloca, we set ALLOCA to alloca.o +# provide the function, we want to define HAVE_FN in config.h. setobjs= CHECK= @@ -1787,7 +1786,6 @@ if test -n "${with_target_subdir}"; then # newlib provide and which ones we will be expected to provide. if test "x${with_newlib}" = "xyes"; then - ALLOCA="alloca.o" LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o" for f in $funcs; do @@ -1917,7 +1915,7 @@ if test -z "${setobjs}"; then # We haven't set the list of objects yet. Use the standard autoconf # tests. This will only work if the compiler works. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1921: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1919: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1928,12 +1926,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1932 "configure" +#line 1930 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1959,19 +1957,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1961: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross for ac_func in $funcs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1970: checking for $ac_func" >&5 +echo "configure:1968: checking for $ac_func" >&5 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 1975 "configure" +#line 1973 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1994,7 +1992,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2020,131 +2018,13 @@ fi done - - case "${host}" in - *-*-interix) - # On Interix, it wrongly concludes that the MSVC compiler supports alloca. - # (MSVC does on Win32, not on Interix.) - # This should be temporary. - - ac_cv_header_alloca_h=no - ac_cv_func_alloca_works=no - ALLOCA=alloca.o - cat >> confdefs.h <<\EOF -#define C_ALLOCA 1 -EOF - cat >> confdefs.h <<EOF -#define STACK_DIRECTION -1 -EOF - ;; - *) - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2045: checking for working alloca.h" >&5 -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 2050 "configure" -#include "confdefs.h" -#include <alloca.h> -int main() { -char *p = alloca(2 * sizeof(int)); -; return 0; } -EOF -if { (eval echo configure:2057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_header_alloca_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_alloca_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 -if test $ac_cv_header_alloca_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA_H 1 -EOF - -fi - -echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2078: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2083 "configure" -#include "confdefs.h" - -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include <malloc.h> -# define alloca _alloca -# else -# if HAVE_ALLOCA_H -# include <alloca.h> -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - -int main() { -char *p = (char *) alloca(1); -; return 0; } -EOF -if { (eval echo configure:2111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_alloca_works=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_alloca_works=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 -if test $ac_cv_func_alloca_works = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA 1 -EOF - -fi - -if test $ac_cv_func_alloca_works = no; then - # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.${ac_objext} - cat >> confdefs.h <<\EOF -#define C_ALLOCA 1 -EOF - - -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2143: checking whether alloca needs Cray hooks" >&5 + echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +echo "configure:2023: checking whether alloca needs Cray hooks" >&5 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 2148 "configure" +#line 2028 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -2167,14 +2047,14 @@ fi echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then -for ac_func in _getb67 GETB67 getb67; do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2173: checking for $ac_func" >&5 + for ac_func in _getb67 GETB67 getb67; do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2053: checking for $ac_func" >&5 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 2178 "configure" +#line 2058 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2197,7 +2077,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2214,17 +2094,16 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then cat >> confdefs.h <<EOF #define CRAY_STACKSEG_END $ac_func EOF - break else echo "$ac_t""no" 1>&6 fi -done + done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2228: checking stack direction for C alloca" >&5 +echo "configure:2107: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2232,7 +2111,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 2236 "configure" +#line 2115 "configure" #include "confdefs.h" find_stack_direction () { @@ -2251,7 +2130,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2270,18 +2149,14 @@ cat >> confdefs.h <<EOF #define STACK_DIRECTION $ac_cv_c_stack_direction EOF -fi - - ;; - esac echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2280: checking for ANSI C header files" >&5 +echo "configure:2155: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2285 "configure" +#line 2160 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2289,7 +2164,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2306,7 +2181,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2310 "configure" +#line 2185 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2324,7 +2199,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2328 "configure" +#line 2203 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2345,7 +2220,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2349 "configure" +#line 2224 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2356,7 +2231,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2380,12 +2255,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2384: checking for pid_t" >&5 +echo "configure:2259: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2389 "configure" +#line 2264 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2414,17 +2289,17 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:2418: checking for vfork.h" >&5 +echo "configure:2293: checking for vfork.h" >&5 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 2423 "configure" +#line 2298 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2449,18 +2324,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:2453: checking for working vfork" >&5 +echo "configure:2328: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:2459: checking for vfork" >&5 +echo "configure:2334: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2464 "configure" +#line 2339 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */ @@ -2483,7 +2358,7 @@ vfork(); ; return 0; } EOF -if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -2505,7 +2380,7 @@ fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext <<EOF -#line 2509 "configure" +#line 2384 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -2600,7 +2475,7 @@ main() { } } EOF -if { (eval echo configure:2604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -2627,19 +2502,19 @@ fi fi for v in $vars; do echo $ac_n "checking for $v""... $ac_c" 1>&6 -echo "configure:2631: checking for $v" >&5 +echo "configure:2506: checking for $v" >&5 if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2636 "configure" +#line 2511 "configure" #include "confdefs.h" int *p; int main() { extern int $v; p = &$v; ; return 0; } EOF -if { (eval echo configure:2643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "libiberty_cv_var_$v=yes" else @@ -2665,12 +2540,12 @@ EOF for ac_func in $checkfuncs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2669: checking for $ac_func" >&5 +echo "configure:2544: checking for $ac_func" >&5 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 2674 "configure" +#line 2549 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2693,7 +2568,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2723,17 +2598,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2727: checking for $ac_hdr" >&5 +echo "configure:2602: checking for $ac_hdr" >&5 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 2732 "configure" +#line 2607 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2762,12 +2637,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2766: checking for $ac_func" >&5 +echo "configure:2641: checking for $ac_func" >&5 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 2771 "configure" +#line 2646 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2790,7 +2665,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2815,7 +2690,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2819: checking for working mmap" >&5 +echo "configure:2694: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2823,7 +2698,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 2827 "configure" +#line 2702 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -2963,7 +2838,7 @@ main() } EOF -if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -2987,7 +2862,7 @@ fi echo $ac_n "checking for working strncmp""... $ac_c" 1>&6 -echo "configure:2991: checking for working strncmp" >&5 +echo "configure:2866: checking for working strncmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2995,7 +2870,7 @@ else ac_cv_func_strncmp_works=no else cat > conftest.$ac_ext <<EOF -#line 2999 "configure" +#line 2874 "configure" #include "confdefs.h" /* Test by Jim Wilson and Kaveh Ghazi. @@ -3056,7 +2931,7 @@ main () } EOF -if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_strncmp_works=yes else @@ -3242,7 +3117,6 @@ s%@host_makefile_frag@%%g s%@CPP@%$CPP%g s%@CHECK@%$CHECK%g s%@LIBOBJS@%$LIBOBJS%g -s%@ALLOCA@%$ALLOCA%g s%@INSTALL_DEST@%$INSTALL_DEST%g CEOF diff --git a/libiberty/configure.in b/libiberty/configure.in index af80e0d..6adf48e 100644 --- a/libiberty/configure.in +++ b/libiberty/configure.in @@ -142,8 +142,7 @@ fi # For each of these functions, if the host does not provide the # function we want to put FN.o in LIBOBJS, and if the host does -# provide the function, we want to define HAVE_FN in config.h. Also, -# if the host does not provide alloca, we set ALLOCA to alloca.o +# provide the function, we want to define HAVE_FN in config.h. setobjs= CHECK= @@ -158,7 +157,6 @@ if test -n "${with_target_subdir}"; then # newlib provide and which ones we will be expected to provide. if test "x${with_newlib}" = "xyes"; then - ALLOCA="alloca.o" LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o" for f in $funcs; do @@ -277,28 +275,7 @@ if test -z "${setobjs}"; then # tests. This will only work if the compiler works. AC_PROG_CC_WORKS AC_REPLACE_FUNCS($funcs) - - case "${host}" in - *-*-interix) - # On Interix, it wrongly concludes that the MSVC compiler supports alloca. - # (MSVC does on Win32, not on Interix.) - # This should be temporary. - - ac_cv_header_alloca_h=no - ac_cv_func_alloca_works=no - ALLOCA=alloca.o - cat >> confdefs.h <<\EOF -#define C_ALLOCA 1 -EOF - cat >> confdefs.h <<EOF -#define STACK_DIRECTION -1 -EOF - ;; - *) - AC_FUNC_ALLOCA - ;; - esac - + libiberty_AC_FUNC_C_ALLOCA AC_FUNC_VFORK if test $ac_cv_func_vfork_works = no; then LIBOBJS="$LIBOBJS vfork.o" |