diff options
author | YamaArashi <shadow962@live.com> | 2016-02-15 16:00:37 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-02-15 16:00:37 -0800 |
commit | 2f209e7d2884f9658a996adeb896233db9fecdad (patch) | |
tree | cc0806a5f4fdaca67ef39a9bb583347c68b54edd /gcc | |
parent | 526fd830c2ce8da3397bc08a267db5aea78db6f3 (diff) |
kill libiberty
Diffstat (limited to 'gcc')
-rwxr-xr-x | gcc/Makefile.in | 156 | ||||
-rwxr-xr-x | gcc/gen-protos.c | 216 | ||||
-rwxr-xr-x | gcc/gsyslimits.h | 8 | ||||
-rwxr-xr-x | gcc/resource.c | 14 |
4 files changed, 31 insertions, 363 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 5f55009..771ca4f 100755 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -290,10 +290,6 @@ CLIB= # system library. OBSTACK=obstack.o -# Configure will set these if you need vfprintf and possibly _doprnt support. -VFPRINTF=@vfprintf@ -DOPRINT=@doprint@ - # Specify the rule for actually making libgcc.a, LIBGCC = libgcc.a # and the rule for installing it. @@ -403,11 +399,6 @@ HOST_CFLAGS=$(ALL_CFLAGS) HOST_CLIB=$(CLIB) HOST_LDFLAGS=$(LDFLAGS) HOST_CPPFLAGS=$(ALL_CPPFLAGS) -HOST_ALLOCA=$(ALLOCA) -HOST_MALLOC=$(MALLOC) -HOST_OBSTACK=$(OBSTACK) -HOST_VFPRINTF=$(VFPRINTF) -HOST_DOPRINT=$(DOPRINT) # Actual name to use when installing a native compiler. GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed -e $$t` @@ -476,34 +467,6 @@ ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) \ # 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 ` - -# Dependency on obstack, alloca, 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= $(OBSTACK) $(ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT) - -# 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) - -# How to link with both our special library facilities -# and the system's installed libraries. -LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT) $(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) $(HOST_CLIB) - HOST_RTL = $(HOST_PREFIX)rtl.o $(HOST_PREFIX)bitmap.o HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o HOST_PRINT = $(HOST_PREFIX)print-rtl.o @@ -789,9 +752,9 @@ stamp-objlist: $(OBJS) # to avoid confusion if the current directory is in the path # and CC is `gcc'. It is renamed to `gcc' when it is installed. xgcc$(exeext): gcc.o version.o choose-temp.o pexecute.o prefix.o version.o \ - mkstemp.o $(LIBDEPS) $(EXTRA_GCC_OBJS) + mkstemp.o $(EXTRA_GCC_OBJS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o prefix.o version.o \ - choose-temp.o pexecute.o mkstemp.o $(EXTRA_GCC_OBJS) $(LIBS) + choose-temp.o pexecute.o mkstemp.o $(EXTRA_GCC_OBJS) # Dump a specs file to make -B./ read these specs over installed ones. specs: xgcc$(exeext) @@ -804,8 +767,8 @@ specs: xgcc$(exeext) gcc-cross: xgcc$(exeext) cp xgcc$(exeext) gcc-cross$(exeext) -cc1$(exeext): $(P) $(OBJS) $(C_OBJS) $(LIBDEPS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(C_OBJS) $(LIBS) +cc1$(exeext): $(P) $(OBJS) $(C_OBJS) + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(C_OBJS) # Build libgcc.a. # This is done in two parts because some functions, in libgcc1.c, @@ -1205,11 +1168,6 @@ pexecute.o: $(srcdir)/../libiberty/pexecute.c $(CONFIG_H) system.h $(LN_S) $(srcdir)/../libiberty/pexecute.c pexecute.c $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) pexecute.c -vfprintf.o: $(srcdir)/../libiberty/vfprintf.c $(CONFIG_H) system.h - rm -f vfprintf.c - $(LN_S) $(srcdir)/../libiberty/vfprintf.c vfprintf.c - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) vfprintf.c - splay-tree.o: $(srcdir)/../libiberty/splay-tree.c \ $(srcdir)/../include/splay-tree.h $(srcdir)/../include/libiberty.h rm -f splay-tree.c @@ -1259,9 +1217,9 @@ s-check : gencheck $(srcdir)/move-if-change $(srcdir)/move-if-change tmp-check.h tree-check.h touch s-check -gencheck : gencheck.o tree.def $(lang_tree_files) $(HOST_LIBDEPS) +gencheck : gencheck.o tree.def $(lang_tree_files) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - gencheck.o $(HOST_LIBS) + gencheck.o gencheck.o : gencheck.c hconfig.h system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencheck.c @@ -1414,15 +1372,6 @@ $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \ insn-flags.h output.h insn-attr.h insn-codes.h system.h toplev.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file) -# 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) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \ - -c `echo alloca.c | sed 's,^\./,,'` - $(ALLOCA_FINISH) # # Generate header and source files from the machine description, # and compile them. @@ -1578,86 +1527,86 @@ $(MD_FILE): $(MD_DEPS) $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@ mv tmp-$@ $@ -genconfig : genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS) +genconfig : genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS) + genconfig.o $(HOST_RTL) $(HOST_PRINT) genconfig.o : genconfig.c $(RTL_H) $(build_xm_file) system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c -genflags : genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS) +genflags : genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS) + genflags.o $(HOST_RTL) $(HOST_PRINT) genflags.o : genflags.c $(RTL_H) $(build_xm_file) system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c -gencodes : gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS) +gencodes : gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS) + gencodes.o $(HOST_RTL) $(HOST_PRINT) gencodes.o : gencodes.c $(RTL_H) $(build_xm_file) system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c -genemit : genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS) +genemit : genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS) + genemit.o $(HOST_RTL) $(HOST_PRINT) genemit.o : genemit.c $(RTL_H) $(build_xm_file) system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c -genopinit : genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS) +genopinit : genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS) + genopinit.o $(HOST_RTL) $(HOST_PRINT) genopinit.o : genopinit.c $(RTL_H) $(build_xm_file) system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c -genrecog : genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS) +genrecog : genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS) + genrecog.o $(HOST_RTL) $(HOST_PRINT) genrecog.o : genrecog.c $(RTL_H) $(build_xm_file) system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c -genextract : genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS) +genextract : genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS) + genextract.o $(HOST_RTL) $(HOST_PRINT) genextract.o : genextract.c $(RTL_H) $(build_xm_file) system.h insn-config.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c -genpeep : genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS) +genpeep : genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS) + genpeep.o $(HOST_RTL) $(HOST_PRINT) genpeep.o : genpeep.c $(RTL_H) $(build_xm_file) system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c -genattr : genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS) +genattr : genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS) + genattr.o $(HOST_RTL) $(HOST_PRINT) genattr.o : genattr.c $(RTL_H) $(build_xm_file) system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c -genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS) +genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS) + genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) system.h insn-config.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c -genoutput : genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS) +genoutput : genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS) + genoutput.o $(HOST_RTL) $(HOST_PRINT) genoutput.o : genoutput.c $(RTL_H) $(build_xm_file) system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c -gengenrtl : gengenrtl.o $(HOST_LIBDEPS) +gengenrtl : gengenrtl.o $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - gengenrtl.o $(HOST_LIBS) + gengenrtl.o gengenrtl.o : gengenrtl.c $(RTL_BASE_H) system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gengenrtl.c @@ -1688,31 +1637,11 @@ $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H) sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.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 rm -f $(HOST_PREFIX)obstack.c sed -e 's/config[.]h/hconfig.h/' $(srcdir)/../libiberty/obstack.c > $(HOST_PREFIX)obstack.c $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c -$(HOST_PREFIX_1)vfprintf.o: $(srcdir)/../libiberty/vfprintf.c - rm -f $(HOST_PREFIX)vfprintf.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/../libiberty/vfprintf.c > $(HOST_PREFIX)vfprintf.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)vfprintf.c - -$(HOST_PREFIX_1)doprint.o: doprint.c - rm -f $(HOST_PREFIX)doprint.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/doprint.c > $(HOST_PREFIX)doprint.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)doprint.c - -$(HOST_PREFIX_1)malloc.o: malloc.c - rm -f $(HOST_PREFIX)malloc.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c - # This satisfies the dependency that we get if you cross-compile a compiler # that does not need to compile alloca, malloc or whatever. $(HOST_PREFIX_1): @@ -1754,28 +1683,6 @@ cpphash.o: cpphash.c cpplib.h machmode.h cpphash.h $(CONFIG_H) system.h cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h machmode.h system.h -# Note for the stamp targets, we run the program `true' instead of -# having an empty command (nothing following the semicolon). - -getopt.o: $(srcdir)/../libiberty/getopt.c $(srcdir)/../include/getopt.h - rm -f getopt.c - $(LN_S) $(srcdir)/../libiberty/getopt.c getopt.c - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) getopt.c - -getopt1.o: $(srcdir)/../libiberty/getopt1.c $(srcdir)/../include/getopt.h - rm -f getopt1.c - $(LN_S) $(srcdir)/../libiberty/getopt1.c getopt1.c - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) getopt1.c - -# This info describes the target machine, so compile with GCC just built. -SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \ - stmp-int-hdrs - -rm -f SYSCALLS.c tmp-SYSCALLS.s - cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ - -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c - -rm -f SYSCALLS.c tmp-SYSCALLS.s - # Build the include directory. The stamp files are stmp-* rather than # s-* so that mostlyclean does not force the include directory to # be rebuilt. @@ -1858,7 +1765,6 @@ mostlyclean: lang.mostlyclean -rm -f $(STAGESTUFF) # Delete the temporary source copies for cross compilation. -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c - -rm -f $(HOST_PREFIX_1)alloca.c $(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 tmplibgcc* tmpcopy libgcc1-test @@ -1876,7 +1782,7 @@ mostlyclean: lang.mostlyclean -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.cse2 -rm -f */*.stack */*.regmove */*.gcse # Delete some files made during installation. - -rm -f specs SYSCALLS.c.X SYSCALLS.c + -rm -f specs -rm -f collect mips-tfile mips-tdump alloca.s # CYGNUS LOCAL: binary installation # Delete unwanted output files from TeX. diff --git a/gcc/gen-protos.c b/gcc/gen-protos.c deleted file mode 100755 index bf32605..0000000 --- a/gcc/gen-protos.c +++ /dev/null @@ -1,216 +0,0 @@ -/* gen-protos.c - massages a list of prototypes, for use by fixproto. - Copyright (C) 1993, 94-96, 1998 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "hconfig.h" -#include "system.h" -#include "scan.h" -#include "cpplib.h" -#include "cpphash.h" - -int verbose = 0; -char *progname; - -#define HASH_SIZE 2503 /* a prime */ -int hash_tab[HASH_SIZE]; -int next_index; - -int -hashf (name, len, hashsize) - register const U_CHAR *name; - register int len; - int hashsize; -{ - register int r = 0; - - while (len--) - r = HASHSTEP (r, *name++); - - return MAKE_POS (r) % hashsize; -} - -static void -add_hash (fname) - char *fname; -{ - int i, i0; - - /* NOTE: If you edit this, also edit lookup_std_proto in fix-header.c !! */ - i = hashf (fname, strlen (fname), HASH_SIZE); - i0 = i; - if (hash_tab[i] != 0) - { - for (;;) - { - i = (i+1) % HASH_SIZE; - if (i == i0) - abort (); - if (hash_tab[i] == 0) - break; - } - } - hash_tab[i] = next_index; - - next_index++; -} - -/* Given a function prototype, fill in the fields of FN. - The result is a boolean indicating if a function prototype was found. - - The input string is modified (trailing NULs are inserted). - The fields of FN point to the input string. */ - -static int -parse_fn_proto (start, end, fn) - char *start, *end; - struct fn_decl *fn; -{ - register char *ptr; - int param_nesting = 1; - char *param_start, *param_end, *decl_start, *name_start, *name_end; - - ptr = end - 1; - while (*ptr == ' ' || *ptr == '\t') ptr--; - if (*ptr-- != ';') - { - fprintf (stderr, "Funny input line: %s\n", start); - return 0; - } - while (*ptr == ' ' || *ptr == '\t') ptr--; - if (*ptr != ')') - { - fprintf (stderr, "Funny input line: %s\n", start); - return 0; - } - param_end = ptr; - for (;;) - { - int c = *--ptr; - if (c == '(' && --param_nesting == 0) - break; - else if (c == ')') - param_nesting++; - } - param_start = ptr+1; - - ptr--; - while (*ptr == ' ' || *ptr == '\t') ptr--; - - if (!ISALNUM ((unsigned char)*ptr)) - { - if (verbose) - fprintf (stderr, "%s: Can't handle this complex prototype: %s\n", - progname, start); - return 0; - } - name_end = ptr+1; - - while (ISALNUM ((unsigned char)*ptr) || *ptr == '_') --ptr; - name_start = ptr+1; - while (*ptr == ' ' || *ptr == '\t') ptr--; - ptr[1] = 0; - *param_end = 0; - *name_end = 0; - - decl_start = start; - if (strncmp (decl_start, "typedef ", 8) == 0) - return 0; - if (strncmp (decl_start, "extern ", 7) == 0) - decl_start += 7; - - fn->fname = name_start; - fn->rtype = decl_start; - fn->params = param_start; - return 1; -} - -int -main (argc, argv) - int argc ATTRIBUTE_UNUSED; - char **argv; -{ - FILE *inf = stdin; - FILE *outf = stdout; - int i; - sstring linebuf; - struct fn_decl fn_decl; - - i = strlen (argv[0]); - while (i > 0 && argv[0][i-1] != '/') --i; - progname = &argv[0][i]; - - INIT_SSTRING (&linebuf); - - fprintf (outf, "struct fn_decl std_protos[] = {\n"); - - /* A hash table entry of 0 means "unused" so reserve it. */ - fprintf (outf, " {\"\", \"\", \"\", 0},\n"); - next_index = 1; - - for (;;) - { - int c = skip_spaces (inf, ' '); - - if (c == EOF) - break; - linebuf.ptr = linebuf.base; - ungetc (c, inf); - c = read_upto (inf, &linebuf, '\n'); - if (linebuf.base[0] == '#') /* skip cpp command */ - continue; - if (linebuf.base[0] == '\0') /* skip empty line */ - continue; - - if (! parse_fn_proto (linebuf.base, linebuf.ptr, &fn_decl)) - continue; - - add_hash (fn_decl.fname); - - fprintf (outf, " {\"%s\", \"%s\", \"%s\", 0},\n", - fn_decl.fname, fn_decl.rtype, fn_decl.params); - - if (c == EOF) - break; - } - fprintf (outf, " {0, 0, 0, 0}\n};\n"); - - - fprintf (outf, "#define HASH_SIZE %d\n", HASH_SIZE); - fprintf (outf, "short hash_tab[HASH_SIZE] = {\n"); - for (i = 0; i < HASH_SIZE; i++) - fprintf (outf, " %d,\n", hash_tab[i]); - fprintf (outf, "};\n"); - - return 0; -} - -/* Avoid error if config defines abort as fancy_abort. - It's not worth "really" implementing this because ordinary - compiler users never run fix-header. */ - -void -fancy_abort () -{ - abort (); -} - -void -fatal (s) - char *s; -{ - fprintf (stderr, "%s: %s\n", "gen-protos", s); - exit (EXIT_FAILURE); -} diff --git a/gcc/gsyslimits.h b/gcc/gsyslimits.h deleted file mode 100755 index a362802..0000000 --- a/gcc/gsyslimits.h +++ /dev/null @@ -1,8 +0,0 @@ -/* syslimits.h stands for the system's own limits.h file. - If we can use it ok unmodified, then we install this text. - If fixincludes fixes it, then the fixed version is installed - instead of this text. */ - -#define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */ -#include_next <limits.h> -#undef _GCC_NEXT_LIMITS_H diff --git a/gcc/resource.c b/gcc/resource.c index d874d52..cd34e86 100755 --- a/gcc/resource.c +++ b/gcc/resource.c @@ -354,13 +354,6 @@ mark_referenced_resources (x, res, include_delayed_effects) case INSN: case JUMP_INSN: - -#ifdef INSN_REFERENCES_ARE_DELAYED - if (! include_delayed_effects - && INSN_REFERENCES_ARE_DELAYED (x)) - return; -#endif - /* No special processing, just speed up. */ mark_referenced_resources (PATTERN (x), res, include_delayed_effects); return; @@ -652,13 +645,6 @@ mark_set_resources (x, res, in_dest, include_delayed_effects) /* An insn consisting of just a CLOBBER (or USE) is just for flow and doesn't actually do anything, so we ignore it. */ - -#ifdef INSN_SETS_ARE_DELAYED - if (! include_delayed_effects - && INSN_SETS_ARE_DELAYED (x)) - return; -#endif - x = PATTERN (x); if (GET_CODE (x) != USE && GET_CODE (x) != CLOBBER) goto restart; |