From: green Date: Sun, 15 Nov 1998 14:28:10 +0000 (+0000) Subject: * Makefile.in: jv-scan and jvgenmain all require libiberty. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1fd28bcdbbba28f954b3f93b9ab65e52fa50dc0;p=platform%2Fupstream%2Flinaro-gcc.git * Makefile.in: jv-scan and jvgenmain all require libiberty. * Make-lang.in: Ditto. * jv-scan.c: Remove xmalloc and xstrdup definitions. * jvgenmain: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23660 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 56639d6..2310854 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,11 @@ +Sun Nov 15 13:52:39 1998 Anthony Green + + * Makefile.in: jv-scan and jvgenmain all require libiberty. + * Make-lang.in: Ditto. + + * jv-scan.c: Remove xmalloc and xstrdup definitions. + * jvgenmain: Ditto. + Sun Nov 15 14:10:56 1998 Per Bothner * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro. diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index 380cf50..0e70024 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -112,7 +112,7 @@ $(GCJ)-cross$(exeext): $(GCJ)$(exeext) # Dependencies here must be kept in sync with dependencies in Makefile.in. jvgenmain$(exeext): $(srcdir)/java/jvgenmain.c $(srcdir)/java/mangle.c \ - $(OBSTACK) + $(OBSTACK) $(LIBDEPS) cd java && $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jvgenmain$(exeext) # This must be kept in sync with dependencies in Makefile.in. @@ -122,14 +122,14 @@ GCJH_SOURCES = $(srcdir)/java/gjavah.c $(srcdir)/java/jcf-io.c \ $(srcdir)/java/javaop.def $(srcdir)/java/jcf-depend.c \ $(srcdir)/java/jcf-path.c -gcjh$(exeext): $(GCJH_SOURCES) +gcjh$(exeext): $(GCJH_SOURCES) $(LIBDEPS) cd java && $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../gcjh$(exeext) # This must be kept in sync with dependencies in Makefile.in. JV_SCAN_SOURCES = $(srcdir)/java/parse-scan.y $(srcdir)/java/lex.c \ - $(srcdir)/java/parse.h $(srcdir)/java/lex.h $(srcdir)/java/jv-scan.c + $(srcdir)/java/parse.h $(srcdir)/java/lex.h $(srcdir)/java/jv-scan.c $(src)/../libiberty/xmalloc.c $(src)/../libiberty/xstrdup.c -jv-scan$(exeext): $(JV_SCAN_SOURCES) stamp-objlist +jv-scan$(exeext): $(JV_SCAN_SOURCES) stamp-objlist $(LIBDEPS) cd java && $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jv-scan$(exeext) # This must be kept in sync with dependencies in Makefile.in. diff --git a/gcc/java/Makefile.in b/gcc/java/Makefile.in index 6d40485..da26066 100644 --- a/gcc/java/Makefile.in +++ b/gcc/java/Makefile.in @@ -186,6 +186,7 @@ JAVA_OBJS = parse.o class.o decl.o expr.o constants.o lang.o typeck.o \ JAVA_OBJS_LITE = parse-scan.o jv-scan.o LIBS = ../../libiberty/libiberty.a +LIBDEPS = $(LIBS) # Language-independent object files. OBJS = `cat ../stamp-objlist` @@ -207,11 +208,11 @@ compiler: ../jc1$(exeext) ../jv-scan$(exeext) jcf-depend.o jcf-path.o zextract.o $(LIBS) # Dependencies here must be kept in sync with dependencies in Make-lang.in. -../jvgenmain$(exeext): jvgenmain.o mangle.o - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ jvgenmain.o mangle.o ../obstack.o +../jvgenmain$(exeext): jvgenmain.o mangle.o $(LIBDEPS) + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ jvgenmain.o mangle.o ../obstack.o $(LIBS) ../gcjh$(exeext): gjavah.o jcf-io.o jcf-depend.o jcf-path.o \ - zextract.o + zextract.o $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gjavah.o jcf-io.o \ jcf-depend.o jcf-path.o zextract.o $(LIBS) diff --git a/gcc/java/jv-scan.c b/gcc/java/jv-scan.c index 9906592..3afd226 100644 --- a/gcc/java/jv-scan.c +++ b/gcc/java/jv-scan.c @@ -169,31 +169,6 @@ fatal VPROTO((char *s, ...)) exit (1); } -char * -xmalloc (size) - unsigned size; -{ - register char *value; - - if (size == 0) - size = 1; - - value = (char *) malloc (size); - if (value == 0) - fatal ("virtual memory exhausted"); - return value; -} - -char * -xstrdup (string) - char *string; -{ - int length = strlen (string)+1; - char *to_return = xmalloc (length); - strcpy (to_return, string); - return to_return; -} - void warning VPROTO((char *s, ...)) { diff --git a/gcc/java/jvgenmain.c b/gcc/java/jvgenmain.c index 5e767af..f0c987e 100644 --- a/gcc/java/jvgenmain.c +++ b/gcc/java/jvgenmain.c @@ -41,19 +41,6 @@ error (const char *str) exit (-1); } -void * -xmalloc (size) - size_t size; -{ - void *ptr = malloc (size); - if (ptr == NULL) - { - fprintf (stderr, "Not enough memory!\n"); - exit (-1); - } - return ptr; -} - void gcc_obstack_init (obstack) struct obstack *obstack;