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: work around libtool to fix alpha libgcj build


On Mon, Feb 14, 2005 at 01:25:43PM -0700, Tom Tromey wrote:
> Yes, thanks.  If you want to add the --tag=disable-static thing, too,
> that is fine by me.

Here's what I actually checked in.  I had to adjust the dependiencies
to make things work on a parallel build.

I tried the --tag=disable-static thing again.  I got it working for
the normal case, but it breaks when configured with --disable-shared,
so I've dropped that bit for now.


r~


        * Makefile.am (libgcj_la_SOURCES): Move all sources ...
        (libgcj0_convenience_la_SOURCES): ... here.
        (libgcj_la_LIBADD): Add libgcj0_convenience.la.
        (libgcj_la_DEPENDENCIES): Include libgcj_la_LIBADD.
        * Makefile.in: Regenerate.

Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.443
diff -u -p -d -r1.443 Makefile.am
--- Makefile.am	14 Feb 2005 21:07:58 -0000	1.443
+++ Makefile.am	15 Feb 2005 17:15:39 -0000
@@ -213,7 +213,11 @@ libgij_la_LIBADD = -L$(here)/.libs libgc
 libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
 
-libgcj_la_SOURCES = prims.cc jni.cc exception.cc \
+# Work around libtool wanting to do piece-wise linking with -r.  Using a
+# convenience library suddenly invokes the --whole-archive path instead.
+# This allows the build to succeed for targets that allocate multiple got
+# subsections in the linker, such as Alpha and MIPS.
+libgcj0_convenience_la_SOURCES = prims.cc jni.cc exception.cc \
 	link.cc defineclass.cc interpret.cc verify.cc \
 	$(nat_source_files) $(math_c_source_files) $(java_source_files) \
 	$(gnu_xml_source_files) $(built_java_source_files) \
@@ -222,9 +226,9 @@ libgcj_la_SOURCES = prims.cc jni.cc exce
 	$(POSIX_PLATFORM_SRC) $(WIN32_PLATFORM_SRC) $(ECOS_PLATFORM_SRC) \
 	$(DARWIN_CRT_SRC) \
 	$(POSIX_THREAD_SRC) $(WIN32_THREAD_SRC) $(NO_THREAD_SRC)
-libgcj_la_DEPENDENCIES = libgcj-@gcc_version@.jar \
-	java/lang/fdlibm.h java/lang/ieeefp.h java/lang/mprec.h \
-	$(LIBLTDL) $(LIBFFI) $(ZLIBS) $(GCLIBS) $(propertyo_files)
+noinst_LTLIBRARIES = libgcj0_convenience.la
+
+libgcj_la_SOURCES =
 
 ## Objects from C++ sources in subdirs.
 nat_files = $(nat_source_files:.cc=.lo)
@@ -239,7 +243,11 @@ libgcj_la_LDFLAGS = -rpath $(toolexeclib
 libgcj_la_LIBADD = \
 	external/sax/libsax_convenience.la \
 	external/w3c_dom/libw3c_convenience.la \
+	libgcj0_convenience.la \
 	$(LIBFFI) $(ZLIBS) $(GCLIBS) $(propertyo_files)
+libgcj_la_DEPENDENCIES = libgcj-@gcc_version@.jar \
+	java/lang/fdlibm.h java/lang/ieeefp.h java/lang/mprec.h \
+	$(libgcj_la_LIBADD)
 libgcj_la_LINK = $(LIBLINK)
 
 # Gtk/Cairo JNI sources.


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