This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: FYI: unbreak the build


>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> The java.endorsed.dirs patch broke the build.  This patch fixes it.
Tom> Sorry this took so long to get out.

Well, that was wrong.  It died at the very last step.

Looking at it, I see I failed to take into account the situation
where we are trying to run a libgcj-using program before 'make install'.
In this situation, the XML libraries won't have been installed,
meaning that the boot class loader will die.

This new patch restores the old XML convenience libraries and links
them into libgcj itself.  This means we can avoid the hacky .spec file
approach.  I think this is safe because, if other BC-compiled
libraries use -Bsymbolic as they are supposed to, there is no danger
of duplicate class registration (we might see two with the same name,
but that is ok as long as they don't wind up with the exact same
symbol).

This approach should also make the Windows build work ok as well.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Don't
	add sax and w3c libraries.
	* Makefile.am (libgij_la_LIBADD): Added libsax-gcj.la and
	libw3c-gcj.la.
	* external/w3c_dom/Makefile.in: Rebuilt.
	* external/w3c_dom/Makefile.am (libw3c_gcj_la_GCJFLAGS): Include
	AM_GCJFLAGS.
	(libw3c_gcj_la_LDFLAGS): New variable.
	(noinst_LTLIBRARIES): Renamed.
	* external/sax/Makefile.in: Rebuilt.
	* external/sax/Makefile.am (libsax_gcj_la_GCJFLAGS): Include
	AM_GCJFLAGS.
	(libsax_gcj_la_LDFLAGS): New variable.
	(noinst_LTLIBRARIES): Renamed.

Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.465
diff -u -r1.465 Makefile.am
--- Makefile.am 24 Mar 2005 00:03:49 -0000 1.465
+++ Makefile.am 24 Mar 2005 18:54:54 -0000
@@ -222,7 +222,9 @@
 libgij_la_SOURCES = gij.cc
 libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
 ## See jv_convert_LDADD.
-libgij_la_LIBADD = -L$(here)/.libs libgcj.la
+libgij_la_LIBADD = -L$(here)/.libs libgcj.la \
+	external/sax/libsax-gcj.la \
+	external/w3c_dom/libw3c-gcj.la
 ## The mysterious backslash in the grep pattern is consumed by make.
 libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
Index: external/sax/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/external/sax/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- external/sax/Makefile.am 24 Mar 2005 00:04:06 -0000 1.4
+++ external/sax/Makefile.am 24 Mar 2005 18:55:00 -0000
@@ -35,10 +35,10 @@
 	-find . -name '*.class' | xargs rm
 	-rm classes.stamp sax.jar
 
-toolexeclib_LTLIBRARIES = libsax-gcj.la
+noinst_LTLIBRARIES = libsax-gcj.la
 
 libsax_gcj_la_SOURCES =	sax.jar
-libsax_gcj_la_GCJFLAGS = -findirect-dispatch
+libsax_gcj_la_GCJFLAGS = -findirect-dispatch $(AM_GCJFLAGS)
 
 source_files = \
 org/xml/sax/SAXNotSupportedException.java \
Index: external/w3c_dom/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/external/w3c_dom/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- external/w3c_dom/Makefile.am 24 Mar 2005 00:04:08 -0000 1.4
+++ external/w3c_dom/Makefile.am 24 Mar 2005 18:55:00 -0000
@@ -35,10 +35,10 @@
 	-find . -name '*.class' | xargs rm
 	-rm classes.stamp w3c.jar
 
-toolexeclib_LTLIBRARIES = libw3c-gcj.la
+noinst_LTLIBRARIES = libw3c-gcj.la
 
 libw3c_gcj_la_SOURCES =	w3c.jar
-libw3c_gcj_la_GCJFLAGS = -findirect-dispatch
+libw3c_gcj_la_GCJFLAGS = -findirect-dispatch $(AM_GCJFLAGS)
 
 source_files = \
 org/w3c/dom/xpath/XPathNamespace.java \
Index: gnu/gcj/runtime/BootClassLoader.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/gcj/runtime/BootClassLoader.java,v
retrieving revision 1.1
diff -u -r1.1 BootClassLoader.java
--- gnu/gcj/runtime/BootClassLoader.java 24 Mar 2005 00:04:12 -0000 1.1
+++ gnu/gcj/runtime/BootClassLoader.java 24 Mar 2005 18:55:00 -0000
@@ -55,13 +55,6 @@
 		  addURL(new URL("file", "", -1, dirname + files[i]));
 	      }
 	  }
-
-	String w3clib = (libdir + File.separator
-			 + System.mapLibraryName ("w3c-gcj"));
-	addURL(new URL("gcjlib", "", -1, w3clib));
-	String saxlib = (libdir + File.separator
-			 + System.mapLibraryName ("sax-gcj"));
-	addURL(new URL("gcjlib", "", -1, saxlib));
       }
     catch (java.net.MalformedURLException x)
       {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]