Makefile.in: jv-scan and jvgenmain all require libiberty.

* Makefile.in: jv-scan and jvgenmain all require libiberty.
	* Make-lang.in: Ditto.
	* jv-scan.c: Remove xmalloc and xstrdup definitions.
	* jvgenmain: Ditto.

From-SVN: r23660
This commit is contained in:
Anthony Green 1998-11-15 14:28:10 +00:00 committed by Anthony Green
parent 0ef3892866
commit 175135a659
5 changed files with 16 additions and 45 deletions

View File

@ -1,3 +1,11 @@
Sun Nov 15 13:52:39 1998 Anthony Green <green@cygnus.com>
* 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 <bothner@cygnus.com>
* jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.

View File

@ -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.

View File

@ -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)

View File

@ -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, ...))
{

View File

@ -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;