Makefile.in (BUILD_ERRORS): Set to build-errors.
* Makefile.in (BUILD_ERRORS): Set to build-errors. (errors.o): New target for host. (build-errors.o): New target for build. (genobjs): Replace errors.o with build-errors. (gengenrtl$(buildexeext)): Add $(BUILD_ERRORS). (GCOV_OBJS, GCOV_DUMP_OBJS): Add errors.o. (fix-headers$(build_exeext)): Add $(BUILD_ERRORS). (fix-header.o): Add errors.h * collect2.c (fancy_abort): Add parameters. * collect2.h (fancy_abort): Don't declare. * errors.h (fancy_abort): Don't declare. * errors.c: Include either bconfig.h or config.h. (fancy_abort): Trim filename. * fix-header.c (v_fatal, fatal): Remove. (progname): Remove definition. (main): Set progname here. * gcc.c (fancy_abort): Add parameters. * gcc.h (fancy_abort): Remove declaration. * gcov.c (fancy_abort): Remove. * rtl.h (fancy_abort): Don't declare. (abort): Don't define. * tree.h (fancy_abort): Don't declare. (abort): Don't define. * system.h (fancy_abort): Declare. (abort): Define to fancy_abort. * fixinc/Makefile.in (ALLOBJ): Add ../build-errors.o * java/jv-scan.c (fancy_abort): Add. From-SVN: r86424
This commit is contained in:
parent
a60945f82f
commit
b3d1f5b404
|
@ -1,5 +1,32 @@
|
|||
2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* Makefile.in (BUILD_ERRORS): Set to build-errors.
|
||||
(errors.o): New target for host.
|
||||
(build-errors.o): New target for build.
|
||||
(genobjs): Replace errors.o with build-errors.
|
||||
(gengenrtl$(buildexeext)): Add $(BUILD_ERRORS).
|
||||
(GCOV_OBJS, GCOV_DUMP_OBJS): Add errors.o.
|
||||
(fix-headers$(build_exeext)): Add $(BUILD_ERRORS).
|
||||
(fix-header.o): Add errors.h
|
||||
* collect2.c (fancy_abort): Add parameters.
|
||||
* collect2.h (fancy_abort): Don't declare.
|
||||
* errors.h (fancy_abort): Don't declare.
|
||||
* errors.c: Include either bconfig.h or config.h.
|
||||
(fancy_abort): Trim filename.
|
||||
* fix-header.c (v_fatal, fatal): Remove.
|
||||
(progname): Remove definition.
|
||||
(main): Set progname here.
|
||||
* gcc.c (fancy_abort): Add parameters.
|
||||
* gcc.h (fancy_abort): Remove declaration.
|
||||
* gcov.c (fancy_abort): Remove.
|
||||
* rtl.h (fancy_abort): Don't declare.
|
||||
(abort): Don't define.
|
||||
* tree.h (fancy_abort): Don't declare.
|
||||
(abort): Don't define.
|
||||
* system.h (fancy_abort): Declare.
|
||||
(abort): Define to fancy_abort.
|
||||
* fixinc/Makefile.in (ALLOBJ): Add ../build-errors.o
|
||||
|
||||
* tree.h (enum size_type_kind): Remove USIZETYPE, UBITSIZETYPE.
|
||||
(usize_type, ubitsizetype): Remove.
|
||||
* stor-layout.c (set_sizetype): Don't initialize usizetype,
|
||||
|
@ -3223,7 +3250,7 @@
|
|||
* config/i386/xmmintrin.h: Include <mm_malloc.h>.
|
||||
|
||||
2004-08-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
Tanguy Fautrà <tfautre@pandora.be>
|
||||
Tanguy Fautrà <tfautre@pandora.be>
|
||||
|
||||
* config/i386/pmm_malloc.h: New file.
|
||||
|
||||
|
|
|
@ -771,7 +771,7 @@ BUILD_SUPPORT = gensupport.o insn-conditions.o
|
|||
BUILD_EARLY_SUPPORT = gensupport.o dummy-conditions.o
|
||||
|
||||
BUILD_PRINT = build-print-rtl.o
|
||||
BUILD_ERRORS = errors.o
|
||||
BUILD_ERRORS = build-errors.o
|
||||
BUILD_VARRAY = build-varray.o
|
||||
|
||||
# Specify the directories to be searched for header files.
|
||||
|
@ -2137,6 +2137,7 @@ lambda-mat.o : lambda-mat.c lambda.h $(GGC_H) $(SYSTEM_H) $(CONFIG_H) $(TM_H)
|
|||
params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(PARAMS_H) toplev.h
|
||||
hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H)
|
||||
pretty-print.o: $(CONFIG_H) $(SYSTEM_H) pretty-print.c $(PRETTY_PRINT_H)
|
||||
errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h
|
||||
|
||||
$(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) $(GGC_H) \
|
||||
$(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
|
||||
|
@ -2464,8 +2465,9 @@ genprogs=$(genprognames:%=%$(build_exeext))
|
|||
genobjs=$(genprognames:%=%.o) read-rtl.o gensupport.o genattrtab.o \
|
||||
genautomata.o gengenrtl.o genmodes.o genpreds.o gengtype.o \
|
||||
genconstants.o gen-protos.o scan.o fix-header.o scan-decls.o \
|
||||
gencheck.o dummy-conditions.o genconditions.o errors.o ggc-none.o \
|
||||
min-insn-modes.o build-rtl.o build-print-rtl.o build-varray.o
|
||||
gencheck.o dummy-conditions.o genconditions.o build-errors.o \
|
||||
ggc-none.o min-insn-modes.o build-rtl.o build-print-rtl.o \
|
||||
build-varray.o
|
||||
|
||||
$(genprogs): %$(build_exeext): %.o $(BUILD_RTL) $(BUILD_SUPPORT) \
|
||||
$(BUILD_PRINT) $(BUILD_ERRORS) \
|
||||
|
@ -2537,9 +2539,9 @@ genautomata.o : genautomata.c $(RTL_BASE_H) $(OBSTACK_H) $(BCONFIG_H) \
|
|||
genoutput.o : genoutput.c $(RTL_BASE_H) $(BCONFIG_H) \
|
||||
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h gensupport.h
|
||||
|
||||
gengenrtl$(build_exeext) : gengenrtl.o $(BUILD_LIBDEPS)
|
||||
gengenrtl$(build_exeext) : gengenrtl.o $(BUILD_ERRORS) $(BUILD_LIBDEPS)
|
||||
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ \
|
||||
gengenrtl.o $(BUILD_LIBS)
|
||||
gengenrtl.o $(BUILD_ERRORS) $(BUILD_LIBS)
|
||||
|
||||
gengenrtl.o : gengenrtl.c $(BCONFIG_H) $(SYSTEM_H) rtl.def
|
||||
|
||||
|
@ -2592,7 +2594,7 @@ genconditions$(build_exeext) : genconditions.o $(BUILD_EARLY_SUPPORT) \
|
|||
genconditions.o : genconditions.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
|
||||
coretypes.h $(GTM_H) errors.h
|
||||
|
||||
errors.o : errors.c $(BCONFIG_H) $(SYSTEM_H) errors.h
|
||||
build-errors.o : errors.c $(BCONFIG_H) $(SYSTEM_H) errors.h
|
||||
ggc-none.o : ggc-none.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H)
|
||||
min-insn-modes.o : min-insn-modes.c $(BCONFIG_H) system.h $(MACHMODE_H)
|
||||
build-rtl.o: rtl.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) $(RTL_H) \
|
||||
|
@ -2711,12 +2713,10 @@ s-iov: gcov-iov$(build_exeext)
|
|||
gcov.o: gcov.c gcov-io.h gcov-io.c gcov-iov.h intl.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)
|
||||
gcov-dump.o: gcov-dump.c gcov-io.h gcov-io.c gcov-iov.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)
|
||||
|
||||
# Only one of 'gcov' or 'gcov.exe' is actually built, depending
|
||||
# upon whether $(exeext) is empty or not.
|
||||
GCOV_OBJS = gcov.o intl.o version.o
|
||||
GCOV_OBJS = gcov.o intl.o version.o errors.o
|
||||
gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@
|
||||
GCOV_DUMP_OBJS = gcov-dump.o version.o
|
||||
GCOV_DUMP_OBJS = gcov-dump.o version.o errors.o
|
||||
gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $(LIBDEPS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) $(GCOV_DUMP_OBJS) $(LIBS) -o $@
|
||||
#
|
||||
|
@ -2841,11 +2841,12 @@ xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos$(build_
|
|||
# This is nominally a 'build' program, but it's run only when host==build,
|
||||
# so we can (indeed, must) use $(LIBDEPS) and $(LIBS).
|
||||
fix-header$(build_exeext): fix-header.o scan-decls.o scan.o xsys-protos.h \
|
||||
c-incpath.o cppdefault.o prefix.o $(LIBDEPS)
|
||||
c-incpath.o cppdefault.o prefix.o $(BUILD_ERRORS) $(LIBDEPS)
|
||||
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ fix-header.o \
|
||||
c-incpath.o cppdefault.o scan-decls.o prefix.o scan.o $(LIBS)
|
||||
c-incpath.o cppdefault.o scan-decls.o prefix.o scan.o \
|
||||
$(BUILD_ERRORS) $(LIBS)
|
||||
|
||||
fix-header.o: fix-header.c $(OBSTACK_H) scan.h \
|
||||
fix-header.o: fix-header.c $(OBSTACK_H) scan.h errors.h \
|
||||
xsys-protos.h $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) $(CPPLIB_H)
|
||||
|
||||
scan-decls.o: scan-decls.c scan.h $(CPPLIB_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H)
|
||||
|
|
|
@ -401,9 +401,9 @@ error (const char * msgid, ...)
|
|||
provide a default entry. */
|
||||
|
||||
void
|
||||
fancy_abort (void)
|
||||
fancy_abort (const char *file, int line, const char *func)
|
||||
{
|
||||
fatal ("internal error");
|
||||
fatal ("internal gcc abort in %s, at %s:%d", func, file, line);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -39,7 +39,6 @@ extern struct obstack temporary_obstack;
|
|||
extern char *temporary_firstobj;
|
||||
extern int vflag, debug;
|
||||
|
||||
extern void fancy_abort (void) ATTRIBUTE_NORETURN;
|
||||
extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
|
||||
extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;
|
||||
extern void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
|
||||
|
|
|
@ -23,7 +23,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||
in the generator programs; the compiler has a more elaborate suite
|
||||
of diagnostic printers, found in diagnostic.c. */
|
||||
|
||||
#ifdef GENERATOR_FILE
|
||||
#include "bconfig.h"
|
||||
#else
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include "system.h"
|
||||
#include "errors.h"
|
||||
|
||||
|
@ -126,5 +130,5 @@ trim_filename (const char *name)
|
|||
void
|
||||
fancy_abort (const char *file, int line, const char *func)
|
||||
{
|
||||
internal_error ("abort in %s, at %s:%d", func, file, line);
|
||||
internal_error ("abort in %s, at %s:%d", func, trim_filename (file), line);
|
||||
}
|
||||
|
|
|
@ -35,8 +35,6 @@ extern void error (const char *, ...);
|
|||
extern void fatal (const char *, ...) ATTRIBUTE_NORETURN;
|
||||
extern void internal_error (const char *, ...) ATTRIBUTE_NORETURN;
|
||||
extern const char *trim_filename (const char *);
|
||||
extern void fancy_abort (const char *, int, const char *)
|
||||
ATTRIBUTE_NORETURN;
|
||||
|
||||
extern int have_error;
|
||||
extern const char *progname;
|
||||
|
|
|
@ -79,10 +79,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
#include "scan.h"
|
||||
#include "cpplib.h"
|
||||
#include "c-incpath.h"
|
||||
|
||||
static void v_fatal (const char *, va_list)
|
||||
ATTRIBUTE_PRINTF (1,0) ATTRIBUTE_NORETURN;
|
||||
static void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
|
||||
#include "errors.h"
|
||||
|
||||
#ifdef TARGET_EXTRA_INCLUDES
|
||||
static void hook_void_int(int u ATTRIBUTE_UNUSED) { }
|
||||
|
@ -407,7 +404,6 @@ lookup_std_proto (const char *name, int name_length)
|
|||
|
||||
char *inc_filename;
|
||||
int inc_filename_length;
|
||||
const char *progname = "fix-header";
|
||||
FILE *outf;
|
||||
sstring line;
|
||||
|
||||
|
@ -1076,6 +1072,7 @@ main (int argc, char **argv)
|
|||
long int inf_size;
|
||||
struct symbol_list *cur_symbols;
|
||||
|
||||
progname = "fix-header";
|
||||
if (argv[0] && argv[0][0])
|
||||
{
|
||||
char *p;
|
||||
|
@ -1301,24 +1298,3 @@ main (int argc, char **argv)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
v_fatal (const char *str, va_list ap)
|
||||
{
|
||||
fprintf (stderr, "%s: %s: ", progname, inc_filename);
|
||||
vfprintf (stderr, str, ap);
|
||||
fprintf (stderr, "\n");
|
||||
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
||||
static void
|
||||
fatal (const char *str, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, str);
|
||||
v_fatal (str, ap);
|
||||
va_end (ap);
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. \
|
|||
LIBERTY = ../../libiberty/libiberty.a
|
||||
|
||||
ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
|
||||
fixlib.o
|
||||
fixlib.o ../build-errors.o
|
||||
|
||||
TESTOBJ = fixincl.o fixlib.o fixtests.o
|
||||
FIXOBJ = fixfixes.o fixlib.o
|
||||
|
|
|
@ -6724,9 +6724,9 @@ pfatal_pexecute (const char *errmsg_fmt, const char *errmsg_arg)
|
|||
/* Output an error message and exit. */
|
||||
|
||||
void
|
||||
fancy_abort (void)
|
||||
fancy_abort (const char *file, int line, const char *func)
|
||||
{
|
||||
fatal ("internal gcc abort");
|
||||
fatal ("internal gcc abort in %s, at %s:%d", func, file, line);
|
||||
}
|
||||
|
||||
/* Output an error message and exit. */
|
||||
|
|
|
@ -56,7 +56,6 @@ struct spec_function
|
|||
/* These are exported by gcc.c. */
|
||||
extern int do_spec (const char *);
|
||||
extern void record_temp_file (const char *, int, int);
|
||||
extern void fancy_abort (void) ATTRIBUTE_NORETURN;
|
||||
extern void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
|
||||
extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
|
||||
extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN;
|
||||
|
|
11
gcc/gcov.c
11
gcc/gcov.c
|
@ -373,17 +373,6 @@ fnotice (FILE *file, const char *msgid, ...)
|
|||
vfprintf (file, _(msgid), ap);
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
/* More 'friendly' abort that prints the line and file.
|
||||
config.h can #define abort fancy_abort if you like that sort of thing. */
|
||||
extern void fancy_abort (void) ATTRIBUTE_NORETURN;
|
||||
|
||||
void
|
||||
fancy_abort (void)
|
||||
{
|
||||
fnotice (stderr, "Internal gcov abort.\n");
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
||||
/* Print a usage message and exit. If ERROR_P is nonzero, this is an error,
|
||||
otherwise the output of --help. */
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* jv-scan.c (fancy_abort): Add.
|
||||
|
||||
2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* expr.c (build_java_arrayaccess): Use convert to change
|
||||
|
@ -8592,7 +8596,7 @@
|
|||
properly initialize `finished_label'. Don't emit gotos for empty
|
||||
try statements.
|
||||
|
||||
2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
|
||||
2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
|
||||
|
||||
* except.c (emit_handlers): Clear catch_clauses_last.
|
||||
|
||||
|
|
|
@ -261,3 +261,9 @@ warning (const char *msgid, ...)
|
|||
fputc ('\n', stderr);
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
void
|
||||
fancy_abort (const char *file, int line, const char *func)
|
||||
{
|
||||
fatal_error ("abort in %s, at %s:%d", func, file, line);
|
||||
}
|
||||
|
|
10
gcc/rtl.h
10
gcc/rtl.h
|
@ -2151,16 +2151,6 @@ extern rtx read_rtx (FILE *);
|
|||
extern const char *read_rtx_filename;
|
||||
extern int read_rtx_lineno;
|
||||
|
||||
/* Redefine abort to report an internal error w/o coredump, and
|
||||
reporting the location of the error in the source file. This logic
|
||||
is duplicated in rtl.h and tree.h because every file that needs the
|
||||
special abort includes one or both. toplev.h gets too few files,
|
||||
system.h gets too many. */
|
||||
|
||||
extern void fancy_abort (const char *, int, const char *)
|
||||
ATTRIBUTE_NORETURN;
|
||||
#define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
|
||||
|
||||
/* In alias.c */
|
||||
extern void clear_reg_alias_info (rtx);
|
||||
extern rtx canon_rtx (rtx);
|
||||
|
|
|
@ -500,6 +500,11 @@ extern int snprintf (char *, size_t, const char *, ...);
|
|||
#define __builtin_expect(a, b) (a)
|
||||
#endif
|
||||
|
||||
/* Redefine abort to report an internal error w/o coredump, and
|
||||
reporting the location of the error in the source file. */
|
||||
extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
|
||||
#define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
|
||||
|
||||
/* Provide a fake boolean type. We make no attempt to use the
|
||||
C99 _Bool, as it may not be available in the bootstrap compiler,
|
||||
and even if it is, it is liable to be buggy.
|
||||
|
|
10
gcc/tree.h
10
gcc/tree.h
|
@ -3746,16 +3746,6 @@ extern const char *dump_flag_name (enum tree_dump_index);
|
|||
extern void set_decl_rtl (tree, rtx);
|
||||
extern void set_decl_incoming_rtl (tree, rtx);
|
||||
|
||||
/* Redefine abort to report an internal error w/o coredump, and
|
||||
reporting the location of the error in the source file. This logic
|
||||
is duplicated in rtl.h and tree.h because every file that needs the
|
||||
special abort includes one or both. toplev.h gets too few files,
|
||||
system.h gets too many. */
|
||||
|
||||
extern void fancy_abort (const char *, int, const char *)
|
||||
ATTRIBUTE_NORETURN;
|
||||
#define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
|
||||
|
||||
/* Enum and arrays used for tree allocation stats.
|
||||
Keep in sync with tree.c:tree_node_kind_names. */
|
||||
typedef enum
|
||||
|
|
Loading…
Reference in New Issue