Patch: fix for PR libgcj/220

Tom Tromey tromey@cygnus.com
Fri May 5 09:10:00 GMT 2000


I'm checking this in.  It fixes libgcj/220, and it makes sure that we
use gcj and not c++ to link.  Using c++ to link means we bring in
libstdc++, which we definitely don't want.

2000-05-05  Tom Tromey  <tromey@cygnus.com>

	Fix for PR libgcj/220:
	* Makefile.in: Rebuilt.
	* Makefile.am (gij_LDFLAGS): Don't use libstdc++.
	(jv_convert_LDFLAGS): Likewise.
	(libgcj_la_LDFLAGS): Likewise.
	(GCJLINK): New macro.
	(jv_convert_LINK): Use it.
	(gij_LINK): Likewise.
	(libgcj_la_LINK): New macro.
	(libgcjawt_la_LINK): Likewise.

Tom

Index: Makefile.am
===================================================================
RCS file: /cvs/java/libgcj/libjava/Makefile.am,v
retrieving revision 1.61
diff -u -r1.61 Makefile.am
--- Makefile.am	2000/05/01 21:36:39	1.61
+++ Makefile.am	2000/05/05 16:07:38
@@ -72,6 +72,7 @@
 endif # CANADIAN
 
 GCJCOMPILE = CLASSPATH=$(here) $(LIBTOOL) --mode=compile $(GCJ) -fassume-compiled -L$(here) $(JC1FLAGS) -c
+GCJLINK = $(LIBTOOL) --mode=link $(GCJ) -L$(here) $(JC1FLAGS) $(LDFLAGS) -o $@
 
 JAVAC = $(GCJ) -C
 
@@ -128,9 +129,10 @@
 	$(c_files) $(GCOBJS) $(THREADOBJS) $(LIBLTDL)
 libgcj_la_LIBADD = $(javao_files) $(nat_files) $(c_files) $(GCOBJS) \
 	$(THREADOBJS) $(libffi_files) $(LIBLTDL)
-libgcj_la_LDFLAGS = -L../libstdc++ -rpath $(toolexeclibdir) \
+libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) \
 ## The mysterious backslash is consumed by make.
 	-version-info `grep -v '^\#' $(srcdir)/libtool-version`
+libgcj_la_LINK = $(GCJLINK)
 
 libgcjawt_la_SOURCES = ## Nothing
 EXTRA_libgcjawt_la_SOURCES = $(awt_java_source_files)
@@ -139,6 +141,7 @@
 libgcjawt_la_LDFLAGS = -rpath $(toolexeclibdir) \
 ## The mysterious backslash is consumed by make.
 	-version-info `grep -v '^\#' $(srcdir)/libtool-version`
+libgcjawt_la_LINK = $(GCJLINK)
 
 ## Make the .class files depend on the .zip file.  This seems
 ## backwards, but is right.  This doesn't catch all the .class files,
@@ -361,9 +364,8 @@
 ## need this because we are explicitly using libtool to link using the
 ## `.la' file.
 jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
-	-rpath `if test -d ../libstdc++; then cd ../libstdc++; pwd; fi` -rpath $(toolexeclibdir)
-jv_convert_LINK = $(LIBTOOL) --mode=link $(GCJ) -L$(here) $(JC1FLAGS) $(LDFLAGS) \
-	-o jv-convert
+	-rpath $(toolexeclibdir)
+jv_convert_LINK = $(GCJLINK)
 ## We explicitly link in the libraries we need.  This way we don't
 ## need -nodefaultlibs, so we can still rely on gcj picking up the
 ## system libraries we need (via the specs file).
@@ -380,9 +382,8 @@
 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
 ## need this because we are explicitly using libtool to link using the
 ## `.la' file.
-gij_LDFLAGS = -rpath `if test -d ../libstdc++; then cd ../libstdc++; pwd; fi` -rpath $(toolexeclibdir)
-gij_LINK = $(LIBTOOL) --mode=link $(GCJ) -L$(here) $(JC1FLAGS) $(LDFLAGS) \
-	-o gij
+gij_LDFLAGS = -rpath $(toolexeclibdir)
+gij_LINK = $(GCJLINK)
 ## We explicitly link in the libraries we need.  This way we don't
 ## need -nodefaultlibs, so we can still rely on gcj picking up the
 ## system libraries we need (via the specs file).


More information about the Java-patches mailing list