This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Fw: Don't build libgcj on irix6.5 - still doesn't work
Alexandre Oliva wrote:
> On Mar 22, 2001, Bryce McKinlay <bryce@albatross.co.nz> wrote:
>
> > Cool! Do we need to do something to libjava's Makefile to have it use
> > "-objectlist", or does this happen automagically when required?
>
> We'll have to do something about it. libtool will do piecewise
> linking by default, but it can only do that if it gets run at all. If
> you overflow the command-line limits in the libtool invocation itself,
> there's nothing libtool can do. Other than providing the -objectlist
> workaround, of course, which the caller is then supposed to use.
Okay, thats what I thought. Here's the patch I hacked up last night to try
and do this, but it doesn't *quite* work. The very last entry in the
objectlist file is "./libltdl/libltdlc.la", which is different from all
the other files because it is an ".la" and not a ".lo". libtool seems to
strip the filename from it, and the linker complains about ./libtldl/
being a directory. Any ideas?
regards
[ bryce ]
--- Makefile.am Thu Mar 22 21:29:13 2001
+++ Makefile.am-attempted-objectlist-hack Thu Mar 22 20:29:44 2001
@@ -142,12 +142,12 @@
libgcj_la_DEPENDENCIES = libgcj.jar $(javao_files) \
$(c_files) $(GCOBJS) $(THREADOBJS) $(LIBLTDL)
+libgcj_la_LIBADD = $(javao_files) $(c_files) $(GCOBJS) \
+ $(THREADOBJS) $(libffi_files) $(LIBLTDL)
# Include THREADLIBS here to ensure that the correct version of
# certain linuxthread functions get linked:
-libgcj_la_LIBADD = $(javao_files) $(c_files) $(GCOBJS) \
- $(THREADOBJS) $(THREADLIBS) $(libffi_files) $(LIBLTDL)
libgcj_la_LDFLAGS = -L$(here)/../libstdc++-v3/libsupc++ -lsupc++ \
- -rpath $(toolexeclibdir) \
+ -rpath $(toolexeclibdir) $(THREADLIBS) \
## The mysterious backslash is consumed by make.
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
libgcj_la_LINK = $(LIBLINK)
@@ -262,6 +262,19 @@
$(javao_files) $(x_javao_files): %.lo: %.java
$(GCJCOMPILE) -o $@ $<
+## Pass the list of object files to libtool in a temporary file to
+## avoid platform command line length limits.
+libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES)
+ echo $(libgcj_la_OBJECTS) > libgcj.objectlist;
+ echo $(libgcj_la_LIBADD) >> libgcj.objectlist;
+ $(libgcj_la_LINK) -objectlist libgcj.objectlist -rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS)
+
+libgcjx.la: $(libgcjx_la_OBJECTS) $(libgcjx_la_DEPENDENCIES)
+ echo $(libgcjx_la_OBJECTS) > libgcjx.objectlist;
+ echo $(libgcjx_la_LIBADD) >> libgcjx.objectlist;
+ $(libgcjx_la_LINK) -objectlist libgcjx.objectlist -rpath $(toolexeclibdir) $(libgcjx_la_LDFLAGS) $(LIBS)
+
+
## ################################################################
##